]> git.baikalelectronics.ru Git - kernel.git/commit
svcrpc: fix handling of too-short rpc's
authorJ. Bruce Fields <bfields@redhat.com>
Wed, 26 Jun 2013 15:09:06 +0000 (11:09 -0400)
committerJ. Bruce Fields <bfields@redhat.com>
Mon, 1 Jul 2013 21:32:04 +0000 (17:32 -0400)
commitb8231187ec548bd23540ac723e54f7b296a7d042
tree54995388695e95c0abed33d68171ca160c5bfd2d
parentda2aeb108ae59d6f4fda5f44b3428cd230803130
svcrpc: fix handling of too-short rpc's

If we detect that an rpc is too short, we abort and close the
connection.  Except, there's a bug here: we're leaving sk_datalen
nonzero without leaving any pages in the sk_pages array.  The most
likely result of the inconsistency is a subsequent crash in
svc_tcp_clear_pages.

Also demote the BUG_ON in svc_tcp_clear_pages to a WARN.

Cc: stable@kernel.org
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
net/sunrpc/svcsock.c