]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
mctp: Use output netdev to allocate skb headroom
authorMatt Johnston <matt@codeconstruct.com.au>
Fri, 1 Apr 2022 02:48:44 +0000 (10:48 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 13 Apr 2022 18:03:13 +0000 (20:03 +0200)
commit420abafe4f8a8e4347112c151ce58bbf21b36ee3
tree6e7182c579d120d0507caf7ec5448c21371f0882
parent82af53430f818d0a0009f37c7d800882204fa6f1
mctp: Use output netdev to allocate skb headroom

[ Upstream commit 4a9dda1c1da65beee994f0977a56a9a21c5db2a7 ]

Previously the skb was allocated with headroom MCTP_HEADER_MAXLEN,
but that isn't sufficient if we are using devs that are not MCTP
specific.

This also adds a check that the smctp_halen provided to sendmsg for
extended addressing is the correct size for the netdev.

Fixes: 833ef3b91de6 ("mctp: Populate socket implementation")
Reported-by: Matthew Rinaldi <mjrinal@g.clemson.edu>
Signed-off-by: Matt Johnston <matt@codeconstruct.com.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
include/net/mctp.h
net/mctp/af_mctp.c
net/mctp/route.c