diff options
| author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-02-03 18:30:53 -0500 |
|---|---|---|
| committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-02-03 18:50:34 -0500 |
| commit | 331818f1c468a24e581aedcbe52af799366a9dfe (patch) | |
| tree | 9bdbc52833c576e21e83d457d350b5db931ebade /include/linux | |
| parent | 7c7ed8ec337bf5f62cc5287a6eb6b2f1b7504c2f (diff) | |
NFSv4: Fix an Oops in the NFSv4 getacl code
Commit bf118a342f10dafe44b14451a1392c3254629a1f (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
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/nfs_xdr.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h index a764cef06b73..d6ba9a12591e 100644 --- a/include/linux/nfs_xdr.h +++ b/include/linux/nfs_xdr.h | |||
| @@ -614,7 +614,6 @@ struct nfs_getaclargs { | |||
| 614 | size_t acl_len; | 614 | size_t acl_len; |
| 615 | unsigned int acl_pgbase; | 615 | unsigned int acl_pgbase; |
| 616 | struct page ** acl_pages; | 616 | struct page ** acl_pages; |
| 617 | struct page * acl_scratch; | ||
| 618 | struct nfs4_sequence_args seq_args; | 617 | struct nfs4_sequence_args seq_args; |
| 619 | }; | 618 | }; |
| 620 | 619 | ||
| @@ -624,6 +623,7 @@ struct nfs_getaclres { | |||
| 624 | size_t acl_len; | 623 | size_t acl_len; |
| 625 | size_t acl_data_offset; | 624 | size_t acl_data_offset; |
| 626 | int acl_flags; | 625 | int acl_flags; |
| 626 | struct page * acl_scratch; | ||
| 627 | struct nfs4_sequence_res seq_res; | 627 | struct nfs4_sequence_res seq_res; |
| 628 | }; | 628 | }; |
| 629 | 629 | ||
