diff options
author | Jakub Kicinski <kuba@kernel.org> | 2022-08-25 16:07:42 -0700 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2022-08-25 16:07:42 -0700 |
commit | 880b0dd94f0399cf772a8582e7b5a47f180c8618 (patch) | |
tree | f85d11673c4ed5c6d28863f5241260483d52433f /net/core/skbuff.c | |
parent | b9030780971b56c0c455c3b66244efd96608846d (diff) | |
parent | 4c612826bec1441214816827979b62f84a097e91 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
drivers/net/ethernet/mellanox/mlx5/core/en_fs.c
21234e3a84c7 ("net/mlx5e: Fix use after free in mlx5e_fs_init()")
c7eafc5ed068 ("net/mlx5e: Convert ethtool_steering member of flow_steering struct to pointer")
https://lore.kernel.org/all/20220825104410.67d4709c@canb.auug.org.au/
https://lore.kernel.org/all/20220823055533.334471-1-saeed@kernel.org/
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/core/skbuff.c')
-rw-r--r-- | net/core/skbuff.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/net/core/skbuff.c b/net/core/skbuff.c index 35d9d5958dc6..48ecfbf29174 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c @@ -4206,9 +4206,8 @@ normal: SKB_GSO_CB(nskb)->csum_start = skb_headroom(nskb) + doffset; } else { - skb_copy_bits(head_skb, offset, - skb_put(nskb, len), - len); + if (skb_copy_bits(head_skb, offset, skb_put(nskb, len), len)) + goto err; } continue; } @@ -4799,7 +4798,7 @@ static bool skb_may_tx_timestamp(struct sock *sk, bool tsonly) { bool ret; - if (likely(sysctl_tstamp_allow_data || tsonly)) + if (likely(READ_ONCE(sysctl_tstamp_allow_data) || tsonly)) return true; read_lock_bh(&sk->sk_callback_lock); |