]> git.baikalelectronics.ru Git - kernel.git/commit
sunrpc: do array overrun check in svc_recv before allocating pages
authorJeff Layton <jlayton@redhat.com>
Fri, 4 May 2012 15:44:12 +0000 (11:44 -0400)
committerJ. Bruce Fields <bfields@redhat.com>
Fri, 1 Jun 2012 00:29:41 +0000 (20:29 -0400)
commita57b23ca5074270b3af7e3656b1c542b5cc600be
tree66f5aaf373ebef288ed561def0f188f1ac5700d5
parent3c80be37c31b7cb180be9c95cd2b834361cf8b5b
sunrpc: do array overrun check in svc_recv before allocating pages

There's little point in waiting until after we allocate all of the pages
to see if we're going to overrun the array. In the event that this
calculation is really off we could end up scribbling over a bunch of
memory and make it tougher to debug.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
net/sunrpc/svc_xprt.c