Skip to content

Commit db39dfd

Browse files
peilin-yekuba-moo
authored andcommitted
udp: Use WARN_ON_ONCE() in udp_read_skb()
Prevent udp_read_skb() from flooding the syslog. Suggested-by: Jakub Sitnicki <[email protected]> Signed-off-by: Peilin Ye <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent c5da4b6 commit db39dfd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/ipv4/udp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1821,7 +1821,7 @@ int udp_read_skb(struct sock *sk, skb_read_actor_t recv_actor)
18211821
continue;
18221822
}
18231823

1824-
WARN_ON(!skb_set_owner_sk_safe(skb, sk));
1824+
WARN_ON_ONCE(!skb_set_owner_sk_safe(skb, sk));
18251825
used = recv_actor(sk, skb);
18261826
if (used <= 0) {
18271827
if (!copied)

0 commit comments

Comments
 (0)