mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
ip: silence udp zerocopy smatch false positive
extra_uref is used in __ip(6)_append_data only if uarg is set.
Smatch sees that the variable is passed to sock_zerocopy_put_abort.
This function accesses it only when uarg is set, but smatch cannot
infer this.
Make this dependency explicit.
Fixes: 52900d2228 ("udp: elide zerocopy operation in hot path")
Signed-off-by: Willem de Bruijn <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
83af01ba1c
commit
97ef7b4c55
2 changed files with 4 additions and 2 deletions
|
|
@ -1130,7 +1130,8 @@ alloc_new_skb:
|
|||
error_efault:
|
||||
err = -EFAULT;
|
||||
error:
|
||||
sock_zerocopy_put_abort(uarg, extra_uref);
|
||||
if (uarg)
|
||||
sock_zerocopy_put_abort(uarg, extra_uref);
|
||||
cork->length -= length;
|
||||
IP_INC_STATS(sock_net(sk), IPSTATS_MIB_OUTDISCARDS);
|
||||
refcount_add(wmem_alloc_delta, &sk->sk_wmem_alloc);
|
||||
|
|
|
|||
Loading…
Reference in a new issue