linux-gbmc: 5.15: fix mctp skb memory leak
Backport upstream commit 64f16b2cfc1b ("mctp: handle skb cleanup on
sock_queue failures") to Linux 5.15 to prevent kernel sk_buff memory leak
when delivering incoming MCTP packets to a socket where sock_queue_rcv_skb
fails (e.g. socket receive buffer is full or socket is shutting down).
Upstream-Status: Backport [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=64f16b2cfc1b017b2b8d4bb98d407ff5661b173c]
Tested:
- Compiled obmc-phosphor-image with 0 patch fuzz and 0 build errors.
- Verified in QEMU simulation with active MCTP interfaces and mctpd service.
- Deployed signed A/B image to physical lab hardware (ddche15-nfd01). Verified:
* uname -r: 5.15.167
* 9 MCTP I2C interfaces (mctpi2c2, mctpi2c4..mctpi2c11) UP/LOWER_UP.
* mctpd service active and running without leak warnings.
* /proc/net/protocols: MCTP protocol family 576 active.
Fusion-Link: http://fusion2/ci/kokoro/prod%3Agbmc%2Ffirmware-build%2Ffirmware%2Fredacted_gbmc_platforms/activity/ace1fcb5-15a8-4f37-9492-9a1a5e96b3a4
Google-Bug-Id: 543881748
Change-Id: I17ce42658400de8af561b773521830f682ae25fd
Signed-off-by: Joseph CT Chan <josephctchan@google.com>