udp: fix possible user after free in error handler
authorPaolo Abeni <pabeni@redhat.com>
Thu, 21 Feb 2019 16:44:00 +0000 (17:44 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sat, 23 Feb 2019 00:05:11 +0000 (16:05 -0800)
commit92b95364235b6441a36861ff0ca4541a13351d60
treea3c10fb8d15b866a0812ed3d3460f09d52968978
parent424a7cd078401591fc45587ffb2c012d7f402fb7
udp: fix possible user after free in error handler

Similar to the previous commit, this addresses the same issue for
ipv4: use a single fetch operation and use the correct rcu
annotation.

Fixes: e7cc082455cb ("udp: Support for error handlers of tunnels with arbitrary destination port")
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Acked-by: Stefano Brivio <sbrivio@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/udp.c