Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
89ff884e
Commit
89ff884e
authored
Mar 11, 2014
by
J. Bruce Fields
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nfsd4: nfsd4_check_resp_size should check against whole buffer
Signed-off-by:
J. Bruce Fields
<
bfields@redhat.com
>
parent
6ff9897d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
2 deletions
+1
-2
fs/nfsd/nfs4xdr.c
fs/nfsd/nfs4xdr.c
+1
-2
No files found.
fs/nfsd/nfs4xdr.c
View file @
89ff884e
...
...
@@ -3762,7 +3762,6 @@ __be32 nfsd4_check_resp_size(struct nfsd4_compoundres *resp, u32 respsize)
{
struct
xdr_buf
*
buf
=
&
resp
->
rqstp
->
rq_res
;
struct
nfsd4_session
*
session
=
resp
->
cstate
.
session
;
int
slack_bytes
=
(
char
*
)
resp
->
xdr
.
end
-
(
char
*
)
resp
->
xdr
.
p
;
if
(
nfsd4_has_session
(
&
resp
->
cstate
))
{
struct
nfsd4_slot
*
slot
=
resp
->
cstate
.
slot
;
...
...
@@ -3775,7 +3774,7 @@ __be32 nfsd4_check_resp_size(struct nfsd4_compoundres *resp, u32 respsize)
return
nfserr_rep_too_big_to_cache
;
}
if
(
respsize
>
slack_bytes
)
{
if
(
buf
->
len
+
respsize
>
buf
->
buflen
)
{
WARN_ON_ONCE
(
nfsd4_has_session
(
&
resp
->
cstate
));
return
nfserr_resource
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment