Re: Oops in 2.6.13-rc5-git-current (0d317fb72fe3cf0f611608cf3a3015bbe6cd2a66)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Alexander Nyberg wrote:
> (akpm: a fix for this needs to go into 2.6.13, inotify + nfs 
> trivially oopses otherwise, even if inotify isn't actively used)

This patch seems to have fixed it for me.

I upgraded to fdbd22dad31982b64a4e663fd056a8a7cfac9607 and applied this
patch on top of it, and I can't retrigger the oops.  (It seemed rather
easy to hit on the other kernel)

So, I guess:

Seems-to-fix-it: Ryan Anderson <[email protected]>

> It looks like the following sequence is done in the wrong order.
> When vfs_unlink() is called from sys_unlink() it has taken a ref
> on the inode and sys_unlink() does the last iput() but when called
> from other callsites vfs_unlink() might do the last iput() and
> free inode, so inotify_inode_queue_event() will receive an already
> freed object and dereference an already freed object.
> 
> Signed-off-by: Alexander Nyberg <[email protected]>
> 
> Index: mm/fs/namei.c
> ===================================================================
> --- mm.orig/fs/namei.c	2005-08-07 12:06:16.000000000 +0200
> +++ mm/fs/namei.c	2005-08-07 18:17:20.000000000 +0200
> @@ -1869,8 +1869,8 @@
>  	/* We don't d_delete() NFS sillyrenamed files--they still exist. */
>  	if (!error && !(dentry->d_flags & DCACHE_NFSFS_RENAMED)) {
>  		struct inode *inode = dentry->d_inode;
> -		d_delete(dentry);
>  		fsnotify_unlink(dentry, inode, dir);
> +		d_delete(dentry);
>  	}
>  
>  	return error;
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [email protected]
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
> 

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFC9pgyfhVDhkBuUKURAjbSAKCavd7s4zdk/uce1TZ0CX018RGRmgCfXWFI
XjAPhBcEoLyJDWnjk9oI+XI=
=NMc4
-----END PGP SIGNATURE-----
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux