]> git.baikalelectronics.ru Git - kernel.git/commit
rds: avoid calling sock_kfree_s() on allocation failure
authorCong Wang <cwang@twopensource.com>
Tue, 14 Oct 2014 19:35:08 +0000 (12:35 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 14 Oct 2014 21:00:19 +0000 (17:00 -0400)
commita355407893b98c2c2c5fbe717b52ff3978064982
treef3ba47780b9bc7362479f3caae851fe527543f35
parentdf0a0e8eb4bfe6b5f6b63e4abd9c3296b91e981f
rds: avoid calling sock_kfree_s() on allocation failure

It is okay to free a NULL pointer but not okay to mischarge the socket optmem
accounting. Compile test only.

Reported-by: rucsoftsec@gmail.com
Cc: Chien Yen <chien.yen@oracle.com>
Cc: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Cong Wang <cwang@twopensource.com>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/rds/rdma.c