diff options
author | Jesper Juhl <jj@chaosbits.net> | 2011-01-17 18:41:50 +0000 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2011-01-25 15:24:46 -0500 |
commit | ad3d2eedf0ed3611f5f86b9e4d0d15cc76c63465 (patch) | |
tree | f391bedf2b6ca950a6c41644f3b469457b4bc57b /fs/freevxfs | |
parent | 0da2a4ac33c291728d8be5bdb865467dcb078d13 (diff) | |
download | op-kernel-dev-ad3d2eedf0ed3611f5f86b9e4d0d15cc76c63465.zip op-kernel-dev-ad3d2eedf0ed3611f5f86b9e4d0d15cc76c63465.tar.gz |
NFS4: Avoid potential NULL pointer dereference in decode_and_add_ds().
On Mon, 17 Jan 2011, Mi Jinlong wrote:
>
>
> Jesper Juhl:
> > strrchr() can return NULL if nothing is found. If this happens we'll
> > dereference a NULL pointer in
> > fs/nfs/nfs4filelayoutdev.c::decode_and_add_ds().
> >
> > I tried to find some other code that guarantees that this can never
> > happen but I was unsuccessful. So, unless someone else can point to some
> > code that ensures this can never be a problem, I believe this patch is
> > needed.
> >
> > While I was changing this code I also noticed that all the dprintk()
> > statements, except one, start with "%s:". The one missing the ":" I added
> > it to.
>
> Maybe another one also should be changed at decode_and_add_ds() at line 243:
>
> 243 printk("%s Decoded address and port %s\n", __func__, buf);
>
Missed that one. Thanks.
Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/freevxfs')
0 files changed, 0 insertions, 0 deletions