linux-stable/net/qrtr
Sricharan Ramabadhran b189baf2f0 net: qrtr: Do not do DEL_SERVER broadcast after DEL_CLIENT
[ Upstream commit 839349d139 ]

On the remote side, when QRTR socket is removed, af_qrtr will call
qrtr_port_remove() which broadcasts the DEL_CLIENT packet to all neighbours
including local NS. NS upon receiving the DEL_CLIENT packet, will remove
the lookups associated with the node:port and broadcasts the DEL_SERVER
packet.

But on the host side, due to the arrival of the DEL_CLIENT packet, the NS
would've already deleted the server belonging to that port. So when the
remote's NS again broadcasts the DEL_SERVER for that port, it throws below
error message on the host:

"failed while handling packet from 2:-2"

So fix this error by not broadcasting the DEL_SERVER packet when the
DEL_CLIENT packet gets processed."

Fixes: 0c2204a4ad ("net: qrtr: Migrate nameservice to kernel from userspace")
Reviewed-by: Manivannan Sadhasivam <mani@kernel.org>
Signed-off-by: Ram Kumar Dharuman <quic_ramd@quicinc.com>
Signed-off-by: Sricharan Ramabadhran <quic_srichara@quicinc.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-04-13 17:02:39 +02:00
..
af_qrtr.c net: qrtr: Fix a refcount bug in qrtr_recvmsg() 2023-04-13 17:02:36 +02:00
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Makefile net: qrtr: combine nameservice into main module 2021-09-28 17:36:43 -07:00
mhi.c net: qrtr: start MHI channel after endpoit creation 2022-08-15 11:21:42 +01:00
ns.c net: qrtr: Do not do DEL_SERVER broadcast after DEL_CLIENT 2023-04-13 17:02:39 +02:00
qrtr.h net: qrtr: fix null-ptr-deref in qrtr_ns_remove 2021-01-05 16:50:09 -08:00
smd.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 284 2019-06-05 17:36:37 +02:00
tun.c net: qrtr: Fix memory leak in qrtr_tun_open 2021-02-23 15:38:22 -08:00