alistair23-linux/fs/nfs
Jesper Juhl ad3d2eedf0 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>
2011-01-25 15:24:46 -05:00
..
cache_lib.c
cache_lib.h
callback.c NFS rename client back channel transport field 2011-01-06 14:46:25 -05:00
callback.h pnfs: update nfs4_callback_recallany to handle layouts 2011-01-06 14:46:32 -05:00
callback_proc.c pnfs: update nfs4_callback_recallany to handle layouts 2011-01-06 14:46:32 -05:00
callback_xdr.c pnfs: CB_LAYOUTRECALL xdr code 2011-01-06 14:46:32 -05:00
client.c NFS: Move cl_delegations to the nfs_server struct 2011-01-06 14:57:46 -05:00
delegation.c NFS: Move cl_delegations to the nfs_server struct 2011-01-06 14:57:46 -05:00
delegation.h NFS: Move cl_delegations to the nfs_server struct 2011-01-06 14:57:46 -05:00
dir.c NFS: Use d_automount() rather than abusing follow_link() 2011-01-15 20:07:34 -05:00
direct.c Pure nfs client performance using odirect. 2010-11-22 13:24:42 -05:00
dns_resolve.c
dns_resolve.h
file.c NFS: Fix fcntl F_GETLK not reporting some conflicts 2010-12-07 19:30:43 -05:00
fscache-index.c
fscache.c
fscache.h
getroot.c switch nfs to ->s_d_op 2011-01-12 20:02:45 -05:00
idmap.c nfs: fix mispelling of idmap CONFIG symbol 2011-01-04 13:10:39 -05:00
inode.c NFS: Use d_automount() rather than abusing follow_link() 2011-01-15 20:07:34 -05:00
internal.h NFS: Use d_automount() rather than abusing follow_link() 2011-01-15 20:07:34 -05:00
iostat.h
Kconfig lockd: push lock_flocks down 2010-10-27 21:39:39 +02:00
Makefile NFSv4.1: pnfs: filelayout: add driver's LAYOUTGET and GETDEVICEINFO infrastructure 2010-10-24 18:07:11 -04:00
mount_clnt.c NFS: Remove redundant unlikely() 2010-12-21 11:51:23 -05:00
namespace.c Unexport do_add_mount() and add in follow_automount(), not ->d_automount() 2011-01-15 20:07:48 -05:00
nfs2xdr.c Merge branch 'bugfixes' into nfs-for-2.6.38 2011-01-10 14:48:02 -05:00
nfs3acl.c
nfs3proc.c NFS: readdir with vmapped pages 2010-10-23 15:27:35 -04:00
nfs3xdr.c Merge branch 'bugfixes' into nfs-for-2.6.38 2011-01-10 14:48:02 -05:00
nfs4_fs.h NFS: Move cl_state_owners and related fields to the nfs_server struct 2011-01-06 14:47:57 -05:00
nfs4filelayout.c pnfs: add prefix to struct pnfs_layout_hdr fields 2011-01-06 14:46:31 -05:00
nfs4filelayout.h NFSv4.1: pnfs: filelayout: add driver's LAYOUTGET and GETDEVICEINFO infrastructure 2010-10-24 18:07:11 -04:00
nfs4filelayoutdev.c NFS4: Avoid potential NULL pointer dereference in decode_and_add_ds(). 2011-01-25 15:24:46 -05:00
nfs4namespace.c
nfs4proc.c NFS fix the setting of exchange id flag 2011-01-11 14:17:09 -05:00
nfs4renewd.c NFS: Move cl_delegations to the nfs_server struct 2011-01-06 14:57:46 -05:00
nfs4state.c NFS: Move cl_state_owners and related fields to the nfs_server struct 2011-01-06 14:47:57 -05:00
nfs4xdr.c Merge branch 'bugfixes' into nfs-for-2.6.38 2011-01-10 14:48:02 -05:00
nfsroot.c NFS: Fix a compile issue in nfs_root 2010-10-26 13:56:42 -04:00
pagelist.c nfs: Take advantage of kmem_cache_zalloc() in nfs_page_alloc() 2010-12-21 11:51:24 -05:00
pnfs.c pnfs: layout roc code 2011-01-06 14:46:32 -05:00
pnfs.h pnfs: layout roc code 2011-01-06 14:46:32 -05:00
proc.c NFS: Don't leak in nfs_proc_symlink() 2011-01-04 13:10:36 -05:00
read.c nfs: remove extraneous and problematic calls to nfs_clear_request 2010-12-07 23:02:44 -05:00
super.c switch nfs to ->s_d_op 2011-01-12 20:02:45 -05:00
symlink.c
sysctl.c NFS: new idmapper 2010-10-07 18:48:49 -04:00
unlink.c Merge branch 'nfs-for-2.6.38' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6 2011-01-11 15:11:56 -08:00
write.c NFS: fix handling of malloc failure during nfs_flush_multi() 2011-01-19 15:37:49 -05:00