summaryrefslogtreecommitdiffstats
path: root/net/rds/ib.c
diff options
context:
space:
mode:
authorXin Long <lucien.xin@gmail.com>2017-02-28 05:41:29 +0100
committerDavid S. Miller <davem@davemloft.net>2017-03-01 18:50:58 +0100
commit5179b26694c92373275e4933f5d0ff32d585c675 (patch)
tree21b426d572e559a571afe171ac55aa71ed46c76b /net/rds/ib.c
parentrxrpc: Fix deadlock between call creation and sendmsg/recvmsg (diff)
downloadlinux-5179b26694c92373275e4933f5d0ff32d585c675.tar.xz
linux-5179b26694c92373275e4933f5d0ff32d585c675.zip
sctp: call rcu_read_lock before checking for duplicate transport nodes
Commit cd2b70875058 ("sctp: check duplicate node before inserting a new transport") called rhltable_lookup() to check for the duplicate transport node in transport rhashtable. But rhltable_lookup() doesn't call rcu_read_lock inside, it could cause a use-after-free issue if it tries to dereference the node that another cpu has freed it. Note that sock lock can not avoid this as it is per sock. This patch is to fix it by calling rcu_read_lock before checking for duplicate transport nodes. Fixes: cd2b70875058 ("sctp: check duplicate node before inserting a new transport") Reported-by: Andrey Konovalov <andreyknvl@google.com> Signed-off-by: Xin Long <lucien.xin@gmail.com> Acked-by: Neil Horman <nhorman@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/rds/ib.c')
0 files changed, 0 insertions, 0 deletions