]> git.baikalelectronics.ru Git - kernel.git/commit
NFSv4: Fix an Oops in the NFSv4 getacl code
authorTrond Myklebust <Trond.Myklebust@netapp.com>
Fri, 3 Feb 2012 23:30:53 +0000 (18:30 -0500)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Fri, 3 Feb 2012 23:50:34 +0000 (18:50 -0500)
commit68b7371cc15567fb52de61fc83a38892e943f96d
tree9bdbc52833c576e21e83d457d350b5db931ebade
parent1c15b00683b13337e3e11e7458130ddaeba28b3b
NFSv4: Fix an Oops in the NFSv4 getacl code

Commit 995614f2fb94b6dd2d778b0f47790ea688d970dd (NFSv4: include bitmap
in nfsv4 get acl data) introduces the 'acl_scratch' page for the case
where we may need to decode multi-page data. However it fails to take
into account the fact that the variable may be NULL (for the case where
we're not doing multi-page decode), and it also attaches it to the
encoding xdr_stream rather than the decoding one.

The immediate result is an Oops in nfs4_xdr_enc_getacl due to the
call to page_address() with a NULL page pointer.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: Andy Adamson <andros@netapp.com>
Cc: stable@vger.kernel.org
fs/nfs/nfs4proc.c
fs/nfs/nfs4xdr.c
include/linux/nfs_xdr.h