]> git.baikalelectronics.ru Git - kernel.git/commit
net: qrtr: fix error return code of qrtr_sendmsg()
authorJia-Ju Bai <baijiaju1990@gmail.com>
Mon, 8 Mar 2021 09:13:55 +0000 (01:13 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 8 Mar 2021 23:02:53 +0000 (15:02 -0800)
commit412f42da5690afa2d5eff7c4c00c0061bbaed57c
tree1c98c5e29f458d1849ac09e78c1cd927dab3e61d
parentcc7f8e8bf9b543b5bc1659429ff878349791b7b2
net: qrtr: fix error return code of qrtr_sendmsg()

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: e9757df91305 ("net: qrtr: Support decoding incoming v2 packets")
Reported-by: TOTE Robot <oslab@tsinghua.edu.cn>
Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/qrtr/qrtr.c