]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: mctp i2c: Copy headers if cloned
authorMatt Johnston <matt@codeconstruct.com.au>
Thu, 6 Mar 2025 02:33:20 +0000 (10:33 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 22 Mar 2025 19:54:11 +0000 (12:54 -0700)
commitcaff87addf19fce84540dc6de9c5baad48bda1e2
tree9831f7450194911dea68e97e30baf2a4ecb3d722
parent370dacb7edc23ffd942ba2af10b8816a9788c6c2
net: mctp i2c: Copy headers if cloned

[ Upstream commit df8ce77ba8b7c012a3edd1ca7368b46831341466 ]

Use skb_cow_head() prior to modifying the TX SKB. This is necessary
when the SKB has been cloned, to avoid modifying other shared clones.

Signed-off-by: Matt Johnston <matt@codeconstruct.com.au>
Fixes: f5b8abf9fc3d ("mctp i2c: MCTP I2C binding driver")
Link: https://patch.msgid.link/20250306-matt-mctp-i2c-cow-v1-1-293827212681@codeconstruct.com.au
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/mctp/mctp-i2c.c