mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dave Young <hidave.darkstar@gmail.com>
To: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Jiri Slaby <jirislaby@gmail.com>,
	linux-kernel@vger.kernel.org,
	Andrew Morton <akpm@linux-foundation.org>,
	dhowells@redhat.com
Subject: Re: isofs oops - d_splice_alias+0x1f (2.6.24-rc5-mm1)
Date: Fri, 4 Jan 2008 19:13:57 +0800	[thread overview]
Message-ID: <20080104111357.GA3429@darkstar.te-china.tietoenator.com> (raw)
In-Reply-To: <20080104104755.GX27894@ZenIV.linux.org.uk>

On Fri, Jan 04, 2008 at 10:47:55AM +0000, Al Viro wrote:
> On Thu, Jan 03, 2008 at 03:15:56PM +0100, Jiri Slaby wrote:
> 
> > Can't say, the DVD seems to be OK, I don't know what was wrong (as I can say,
> > this happened several times in the past yet and after reboot everything OK; I
> > suspect gnome auto mounter -- multiple machines, several DVD ROMs, same disk
> > with OS, similar errors, but that's too few to report).
> 
> It is -mm-specific, all right - fallout from
> 	iget-stop-isofs-from-using-read_inode.patch
> not covered in
> 	iget-stop-isofs-from-using-read_inode-fix*
> 
> Callers in fs/isofs/namei.c are missed.

Yes, some isofs_iget return value should be handled, it is missed.

Maybe this:

Signed-off-by: Dave Young <hidave.darkstar@gmail.com> 

---
fs/isofs/export.c |    8 ++++----
fs/isofs/namei.c  |    4 ++--
fs/isofs/rock.c   |    4 +++-
3 files changed, 9 insertions(+), 7 deletions(-)

diff -upr linux/fs/isofs/export.c linux.new/fs/isofs/export.c
--- linux/fs/isofs/export.c	2008-01-04 18:54:40.000000000 +0800
+++ linux.new/fs/isofs/export.c	2008-01-04 19:04:31.000000000 +0800
@@ -26,8 +26,8 @@ isofs_export_iget(struct super_block *sb
 	if (block == 0)
 		return ERR_PTR(-ESTALE);
 	inode = isofs_iget(sb, block, offset);
-	if (inode == NULL)
-		return ERR_PTR(-ENOMEM);
+	if (IS_ERR(inode))
+		return inode;
 	if (is_bad_inode(inode)
 	    || (generation && inode->i_generation != generation))
 	{
@@ -110,8 +110,8 @@ static struct dentry *isofs_export_get_p
 	parent_inode = isofs_iget(child_inode->i_sb,
 				  parent_block,
 				  parent_offset);
-	if (parent_inode == NULL) {
-		rv = ERR_PTR(-EACCES);
+	if (IS_ERR(parent_inode)) {
+		rv = parent_inode;
 		goto out;
 	}
 
diff -upr linux/fs/isofs/namei.c linux.new/fs/isofs/namei.c
--- linux/fs/isofs/namei.c	2008-01-04 18:54:40.000000000 +0800
+++ linux.new/fs/isofs/namei.c	2008-01-04 18:57:27.000000000 +0800
@@ -179,9 +179,9 @@ struct dentry *isofs_lookup(struct inode
 	inode = NULL;
 	if (found) {
 		inode = isofs_iget(dir->i_sb, block, offset);
-		if (!inode) {
+		if (IS_ERR(inode)) {
 			unlock_kernel();
-			return ERR_PTR(-EACCES);
+			return inode;
 		}
 	}
 	unlock_kernel();
diff -upr linux/fs/isofs/rock.c linux.new/fs/isofs/rock.c
--- linux/fs/isofs/rock.c	2008-01-04 18:54:40.000000000 +0800
+++ linux.new/fs/isofs/rock.c	2008-01-04 19:01:10.000000000 +0800
@@ -474,8 +474,10 @@ repeat:
 			    isofs_iget(inode->i_sb,
 				       ISOFS_I(inode)->i_first_extent,
 				       0);
-			if (!reloc)
+			if (IS_ERR(reloc)) {
+				err = PTR_ERR(reloc);
 				goto out;
+			}
 			inode->i_mode = reloc->i_mode;
 			inode->i_nlink = reloc->i_nlink;
 			inode->i_uid = reloc->i_uid;

  reply	other threads:[~2008-01-04 11:10 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-03 13:23 Jiri Slaby
2008-01-03 13:51 ` Pekka J Enberg
2008-01-03 14:11   ` Ingo Molnar
2008-01-03 14:14     ` Al Viro
2008-01-03 14:11   ` Al Viro
2008-01-03 14:15   ` Jiri Slaby
2008-01-04 10:47     ` Al Viro
2008-01-04 11:13       ` Dave Young [this message]
2008-01-04 11:25         ` Dave Young
2008-01-04 11:26         ` Al Viro
2008-01-04 12:24         ` David Howells
2008-01-04 12:35           ` Al Viro
2008-01-04 12:43           ` David Howells
2008-01-04 13:29             ` Ingo Molnar
2008-01-03 14:10 ` Al Viro
2008-01-05  9:31   ` Andrew Morton
2008-01-05  9:46     ` Al Viro

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080104111357.GA3429@darkstar.te-china.tietoenator.com \
    --to=hidave.darkstar@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=dhowells@redhat.com \
    --cc=jirislaby@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@ZenIV.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®