diff options
author | Eric Dumazet <edumazet@google.com> | 2023-04-21 12:43:54 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2023-04-23 15:35:07 +0300 |
commit | 931e93bdf8ca71cef1f8759c43bc2c5385392b8b (patch) | |
tree | a75f366dac74b28ef860605937bbc15caabfe971 /net/core/dev.c | |
parent | e8e1ce8454c9cc8ad2e4422bef346428e52455e3 (diff) | |
download | linux-931e93bdf8ca71cef1f8759c43bc2c5385392b8b.tar.xz |
net: do not provide hard irq safety for sd->defer_lock
kfree_skb() can be called from hard irq handlers,
but skb_attempt_defer_free() is meant to be used
from process or BH contexts, and skb_defer_free_flush()
is meant to be called from BH contexts.
Not having to mask hard irq can save some cycles.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/dev.c')
-rw-r--r-- | net/core/dev.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index 1551aabac343..d15568f5a44f 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -6632,11 +6632,11 @@ static void skb_defer_free_flush(struct softnet_data *sd) if (!READ_ONCE(sd->defer_list)) return; - spin_lock_irq(&sd->defer_lock); + spin_lock(&sd->defer_lock); skb = sd->defer_list; sd->defer_list = NULL; sd->defer_count = 0; - spin_unlock_irq(&sd->defer_lock); + spin_unlock(&sd->defer_lock); while (skb != NULL) { next = skb->next; |