]> git.baikalelectronics.ru Git - kernel.git/commit
net: sock_map, fix missing ulp check in sock hash case
authorJohn Fastabend <john.fastabend@gmail.com>
Tue, 3 Sep 2019 20:24:50 +0000 (13:24 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 5 Sep 2019 09:56:19 +0000 (11:56 +0200)
commita2921fa6fc1a33dcd96a210740882def46975751
treee20b7033f69b160b603eaf9a9809ee5742066f8c
parentcecf79860a085f54fceb4f2c5f9f712db40ef72d
net: sock_map, fix missing ulp check in sock hash case

sock_map and ULP only work together when ULP is loaded after the sock
map is loaded. In the sock_map case we added a check for this to fail
the load if ULP is already set. However, we missed the check on the
sock_hash side.

Add a ULP check to the sock_hash update path.

Fixes: 38506f4bbc9de ("bpf, sockmap: convert to generic sk_msg interface")
Reported-by: syzbot+7a6ee4d0078eac6bf782@syzkaller.appspotmail.com
Signed-off-by: John Fastabend <john.fastabend@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/sock_map.c