diff options
author | Jakub Kicinski <kuba@kernel.org> | 2023-01-06 02:34:11 +0300 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2023-01-06 02:34:11 +0300 |
commit | 4aea86b4033f92f01547e6d4388d4451ae9b0980 (patch) | |
tree | 1e6e70b8133187b56d636ad9bb942c81b2654173 /net/core | |
parent | 0471005efac9ac70bffd50532f8de07a28eac5aa (diff) | |
parent | 50011c32f421215f6231996fcc84fd1fe81c4a48 (diff) | |
download | linux-4aea86b4033f92f01547e6d4388d4451ae9b0980.tar.xz |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
No conflicts.
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/filter.c | 7 | ||||
-rw-r--r-- | net/core/gen_estimator.c | 2 |
2 files changed, 6 insertions, 3 deletions
diff --git a/net/core/filter.c b/net/core/filter.c index c746e4d77214..ab811293ae5d 100644 --- a/net/core/filter.c +++ b/net/core/filter.c @@ -3180,15 +3180,18 @@ static int bpf_skb_generic_push(struct sk_buff *skb, u32 off, u32 len) static int bpf_skb_generic_pop(struct sk_buff *skb, u32 off, u32 len) { + void *old_data; + /* skb_ensure_writable() is not needed here, as we're * already working on an uncloned skb. */ if (unlikely(!pskb_may_pull(skb, off + len))) return -ENOMEM; - skb_postpull_rcsum(skb, skb->data + off, len); - memmove(skb->data + len, skb->data, off); + old_data = skb->data; __skb_pull(skb, len); + skb_postpull_rcsum(skb, old_data + off, len); + memmove(skb->data, old_data, off); return 0; } diff --git a/net/core/gen_estimator.c b/net/core/gen_estimator.c index 4fcbdd71c59f..fae9c4694186 100644 --- a/net/core/gen_estimator.c +++ b/net/core/gen_estimator.c @@ -208,7 +208,7 @@ void gen_kill_estimator(struct net_rate_estimator __rcu **rate_est) est = xchg((__force struct net_rate_estimator **)rate_est, NULL); if (est) { - del_timer_sync(&est->timer); + timer_shutdown_sync(&est->timer); kfree_rcu(est, rcu); } } |