This is a note to let you know that I've just added the patch titled net: ieee802154: fix error return code in dgram_bind() to the 6.0-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-ieee802154-fix-error-return-code-in-dgram_bind.patch and it can be found in the queue-6.0 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 444d8ad4916edec8a9fc684e841287db9b1e999f Mon Sep 17 00:00:00 2001 From: Wei Yongjun <weiyongjun1@xxxxxxxxxx> Date: Mon, 19 Sep 2022 16:08:30 +0000 Subject: net: ieee802154: fix error return code in dgram_bind() From: Wei Yongjun <weiyongjun1@xxxxxxxxxx> commit 444d8ad4916edec8a9fc684e841287db9b1e999f upstream. Fix to return error code -EINVAL from the error handling case instead of 0, as done elsewhere in this function. Fixes: 94160108a70c ("net/ieee802154: fix uninit value bug in dgram_sendmsg") Signed-off-by: Wei Yongjun <weiyongjun1@xxxxxxxxxx> Link: https://lore.kernel.org/r/20220919160830.1436109-1-weiyongjun@xxxxxxxxxxxxxxx Signed-off-by: Stefan Schmidt <stefan@xxxxxxxxxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- net/ieee802154/socket.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- a/net/ieee802154/socket.c +++ b/net/ieee802154/socket.c @@ -502,8 +502,10 @@ static int dgram_bind(struct sock *sk, s if (err < 0) goto out; - if (addr->family != AF_IEEE802154) + if (addr->family != AF_IEEE802154) { + err = -EINVAL; goto out; + } ieee802154_addr_from_sa(&haddr, &addr->addr); dev = ieee802154_get_dev(sock_net(sk), &haddr); Patches currently in stable-queue which might be from weiyongjun1@xxxxxxxxxx are queue-6.0/net-ieee802154-fix-error-return-code-in-dgram_bind.patch