This is a note to let you know that I've just added the patch titled net: qrtr: fix error return code of qrtr_sendmsg() to the 5.11-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: net-qrtr-fix-error-return-code-of-qrtr_sendmsg.patch and it can be found in the queue-5.11 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 179d0ba0c454057a65929c46af0d6ad986754781 Mon Sep 17 00:00:00 2001 From: Jia-Ju Bai <baijiaju1990@xxxxxxxxx> Date: Mon, 8 Mar 2021 01:13:55 -0800 Subject: net: qrtr: fix error return code of qrtr_sendmsg() From: Jia-Ju Bai <baijiaju1990@xxxxxxxxx> commit 179d0ba0c454057a65929c46af0d6ad986754781 upstream. When sock_alloc_send_skb() returns NULL to skb, no error return code of qrtr_sendmsg() is assigned. To fix this bug, rc is assigned with -ENOMEM in this case. Fixes: 194ccc88297a ("net: qrtr: Support decoding incoming v2 packets") Reported-by: TOTE Robot <oslab@xxxxxxxxxxxxxxx> Signed-off-by: Jia-Ju Bai <baijiaju1990@xxxxxxxxx> Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- net/qrtr/qrtr.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- a/net/qrtr/qrtr.c +++ b/net/qrtr/qrtr.c @@ -958,8 +958,10 @@ static int qrtr_sendmsg(struct socket *s plen = (len + 3) & ~3; skb = sock_alloc_send_skb(sk, plen + QRTR_HDR_MAX_SIZE, msg->msg_flags & MSG_DONTWAIT, &rc); - if (!skb) + if (!skb) { + rc = -ENOMEM; goto out_node; + } skb_reserve(skb, QRTR_HDR_MAX_SIZE); Patches currently in stable-queue which might be from baijiaju1990@xxxxxxxxx are queue-5.11/net-qrtr-fix-error-return-code-of-qrtr_sendmsg.patch queue-5.11/net-bonding-fix-error-return-code-of-bond_neigh_init.patch