* [PATCH] Prevent oops in nfs_sb_init
@ 2004-03-23 10:17 Olaf Kirch
2004-03-23 16:00 ` Trond Myklebust
0 siblings, 1 reply; 3+ messages in thread
From: Olaf Kirch @ 2004-03-23 10:17 UTC (permalink / raw)
To: nfs
[-- Attachment #1: Type: text/plain, Size: 273 bytes --]
nfs_sb_init will crash when the fsinfo call fails, because
it tries to iput() an uninitialized pointer. The attached patch
should fix this.
Olaf
--
Olaf Kirch | Stop wasting entropy - start using predictable
okir@suse.de | tempfile names today!
---------------+
[-- Attachment #2: nfs-mount-fail-crash --]
[-- Type: text/plain, Size: 634 bytes --]
--- linux-2.6.4/fs/nfs/inode.c.orig 2004-03-22 17:21:52.000000000 +0100
+++ linux-2.6.4/fs/nfs/inode.c 2004-03-23 11:13:17.000000000 +0100
@@ -277,7 +277,7 @@
nfs_sb_init(struct super_block *sb, rpc_authflavor_t authflavor)
{
struct nfs_server *server;
- struct inode *root_inode;
+ struct inode *root_inode = NULL;
struct nfs_fattr fattr;
struct nfs_fsinfo fsinfo = {
.fattr = &fattr,
@@ -361,7 +361,7 @@
/* Yargs. It didn't work out. */
out_no_root:
printk("nfs_read_super: get root inode failed\n");
- if (!IS_ERR(root_inode))
+ if (root_inode && !IS_ERR(root_inode))
iput(root_inode);
return -EINVAL;
}
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Prevent oops in nfs_sb_init
2004-03-23 10:17 [PATCH] Prevent oops in nfs_sb_init Olaf Kirch
@ 2004-03-23 16:00 ` Trond Myklebust
2004-03-23 16:23 ` Olaf Kirch
0 siblings, 1 reply; 3+ messages in thread
From: Trond Myklebust @ 2004-03-23 16:00 UTC (permalink / raw)
To: Olaf Kirch; +Cc: nfs
P=E5 ty , 23/03/2004 klokka 05:17, skreiv Olaf Kirch:
> nfs_sb_init will crash when the fsinfo call fails, because
> it tries to iput() an uninitialized pointer. The attached patch
> should fix this.
This bug should already be fixed in 2.6.5-rc2...
Cheers,
Trond
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
NFS maillist - NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Prevent oops in nfs_sb_init
2004-03-23 16:00 ` Trond Myklebust
@ 2004-03-23 16:23 ` Olaf Kirch
0 siblings, 0 replies; 3+ messages in thread
From: Olaf Kirch @ 2004-03-23 16:23 UTC (permalink / raw)
To: Trond Myklebust; +Cc: nfs
On Tue, Mar 23, 2004 at 11:00:25AM -0500, Trond Myklebust wrote:
> P=E5 ty , 23/03/2004 klokka 05:17, skreiv Olaf Kirch:
> > nfs_sb_init will crash when the fsinfo call fails, because
> > it tries to iput() an uninitialized pointer. The attached patch
> > should fix this.
>=20
> This bug should already be fixed in 2.6.5-rc2...
Ah, good to know.
Thanks,
Olaf
--=20
Olaf Kirch | Stop wasting entropy - start using predictable
okir@suse.de | tempfile names today!
---------------+=20
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
NFS maillist - NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-03-23 16:23 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-03-23 10:17 [PATCH] Prevent oops in nfs_sb_init Olaf Kirch
2004-03-23 16:00 ` Trond Myklebust
2004-03-23 16:23 ` Olaf Kirch
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.