| To: | Ben Myers <bpm@xxxxxxx> |
|---|---|
| Subject: | Re: [PATCH] xfs: don't leak root inode reference |
| From: | Al Viro <viro@xxxxxxxxxxxxxxxxxx> |
| Date: | Mon, 26 Aug 2013 22:03:32 +0100 |
| Cc: | xfs@xxxxxxxxxxx |
| Delivered-to: | xfs@xxxxxxxxxxx |
| In-reply-to: | <20130826204730.GZ7153@xxxxxxx> |
| References: | <20130826204730.GZ7153@xxxxxxx> |
| Sender: | Al Viro <viro@xxxxxxxxxxxxxxxx> |
| User-agent: | Mutt/1.5.21 (2010-09-15) |
On Mon, Aug 26, 2013 at 03:47:30PM -0500, Ben Myers wrote:
> Looks like in 48fde701 we removed the iput of the root inode in
> xfs_fs_fill_super for the error case. Add it back.
> if (is_bad_inode(root)) {
> error = EINVAL;
> - goto out_unmount;
> + goto out_iput;
This one makes sense
> }
> sb->s_root = d_make_root(root);
> if (!sb->s_root) {
> error = ENOMEM;
> - goto out_unmount;
> + goto out_iput;
... this one, OTOH, is simply wrong - take a look at what d_make_root()
does on failure.
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | [PATCH] xfs: don't leak root inode reference, Ben Myers |
|---|---|
| Next by Date: | Re: [PATCH] Re: XFS: Assertion failed: first <= last && last < BBTOB(bp->b_length), file: fs/xfs/xfs_trans_buf.c, line: 568, Dave Chinner |
| Previous by Thread: | [PATCH] xfs: don't leak root inode reference, Ben Myers |
| Next by Thread: | Re: [PATCH] xfs: don't leak root inode reference, Dave Chinner |
| Indexes: | [Date] [Thread] [Top] [All Lists] |