2002-05-03 15:56:41

by Kendrick M. Smith

[permalink] [raw]
Subject: completely unimportant bug in fs/nfs/inode.c


Hi Trond et al,

Here is a completely unimportant bug in the latest (2.5.12)
fs/nfs/inode.c. In nfs_get_sb(), a couple of error paths have
memory leaks. I believe the block
if (root->size > sizeof(root->data)) {
printk("nfs_get_sb: invalid root filehandle\n");
return ERR_PTR(-EINVAL);
}
should also contain
kfree(server);
The same comment also applies to the check on the return value
of nfs_fill_super() near the bottom of the routine.

Cheers,
Kendrick



_______________________________________________________________

Have big pipes? SourceForge.net is looking for download mirrors. We supply
the hardware. You get the recognition. Email Us: [email protected]
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs


2002-05-03 17:04:36

by Trond Myklebust

[permalink] [raw]
Subject: Re: completely unimportant bug in fs/nfs/inode.c

>>>>> " " == Kendrick M Smith <[email protected]> writes:

> Hi Trond et al,

> Here is a completely unimportant bug in the latest (2.5.12)
> fs/nfs/inode.c. In nfs_get_sb(), a couple of error paths have
> memory leaks. I believe the block
> if (root->size > sizeof(root->data)) {
> printk("nfs_get_sb: invalid root filehandle\n"); return
> ERR_PTR(-EINVAL);
> }
> should also contain
> kfree(server);
> The same comment also applies to the check on the return value
> of nfs_fill_super() near the bottom of the routine.

Thanks Kendrick. I appear to have missed those when I OKed Al's
patch. I'll try to get round to fixing it up soon...

Cheers,
Trond

_______________________________________________________________

Have big pipes? SourceForge.net is looking for download mirrors. We supply
the hardware. You get the recognition. Email Us: [email protected]
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs