]> www.infradead.org Git - users/jedix/linux-maple.git/commit
net/sock: add WARN_ON(parent->sk) in sock_graft()
authorSowmini Varadhan <sowmini.varadhan@oracle.com>
Thu, 6 Jul 2017 15:15:07 +0000 (08:15 -0700)
committerChuck Anderson <chuck.anderson@oracle.com>
Wed, 26 Jul 2017 03:56:47 +0000 (20:56 -0700)
commitb347809061bbe94dcd39d38306139944ec2f57b8
tree9905a8745406093bcb828d2c9b60d07530b4b551
parenta670499f5a9a7b3cbe515685e097dc518a454010
net/sock: add WARN_ON(parent->sk) in sock_graft()

sock_graft() unilaterally sets up parent->sk based on the
assumption that the existing parent->sk is null. If this
condition is not true, then the existing parent->sk would
be leaked, so add a WARN_ON() to alert callers who may fall
in this category.

Orabug: 26477756

Signed-off-by: Sowmini Varadhan <sowmini.varadhan@oracle.com>
Reviewed-by: Yuval Shaia <yuval.shaia@oracle.com>
include/net/sock.h