aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorlinzhang <xiaolou4617@gmail.com>2017-05-25 14:07:18 +0800
committerDavid S. Miller <davem@davemloft.net>2017-05-26 14:20:29 -0400
commit0908cf4dfef35fc6ac12329007052ebe93ff1081 (patch)
tree84925b3d7052ed3117939b267024da24d680d00e /drivers/net
parentbonding: Don't update slave->link until ready to commit (diff)
downloadlinux-dev-0908cf4dfef35fc6ac12329007052ebe93ff1081.tar.xz
linux-dev-0908cf4dfef35fc6ac12329007052ebe93ff1081.zip
net: llc: add lock_sock in llc_ui_bind to avoid a race condition
There is a race condition in llc_ui_bind if two or more processes/threads try to bind a same socket. If more processes/threads bind a same socket success that will lead to two problems, one is this action is not what we expected, another is will lead to kernel in unstable status or oops(in my simple test case, cause llc2.ko can't unload). The current code is test SOCK_ZAPPED bit to avoid a process to bind a same socket twice but that is can't avoid more processes/threads try to bind a same socket at the same time. So, add lock_sock in llc_ui_bind like others, such as llc_ui_connect. Signed-off-by: Lin Zhang <xiaolou4617@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
0 files changed, 0 insertions, 0 deletions