]> git.proxmox.com Git - mirror_ubuntu-hirsute-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)
committerSeth Forshee <seth.forshee@canonical.com>
Wed, 17 Mar 2021 18:37:43 +0000 (13:37 -0500)
commite52c23d235c22242c1054441a4627a111868173d
treedb3e24ce4774719b4d27e265430300ad649deef6
parentf8b2079b92296cc531a6f429d999f6f442b1bba7
net: qrtr: fix error return code of qrtr_sendmsg()

BugLink: https://bugs.launchpad.net/bugs/1919492
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@tsinghua.edu.cn>
Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
net/qrtr/qrtr.c