The commit 60fb9567bf30 ("udp: implement complete book-keeping for
encap_needed") introduced a severe misuse of jump label APIs, which
syzbot, as reported by Eric, was able to exploit.
When multiple sockets/process can concurrently request (and than
disable) the udp encap, we need to track the activation counter with
*_inc()/*_dec() jump label variants, or we can experience bad things
at disable time.
Change-Id: Ic0063bfd1e0800aa0ce8c18490fb3e6ec2f27981
CRs-Fixed: 2351793
Fixes: 60fb9567bf30 ("udp: implement complete book-keeping for encap_needed")
Reported-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Patch-mainline: netdev @ Nov. 15, 2018, 1:34 a.m.
Signed-off-by: Sean Tranchetti <stranche@codeaurora.org>