]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
net: qrtr: ns: Free the node during ctrl_cmd_bye()
authorManivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
Thu, 9 Apr 2026 17:34:14 +0000 (23:04 +0530)
committerJakub Kicinski <kuba@kernel.org>
Mon, 13 Apr 2026 22:34:06 +0000 (15:34 -0700)
commit68efba36446a7774ea5b971257ade049272a07ac
tree2f4e9194efbee8b31ff6fc34a48b22ba7d1ab765
parent5640227d9a21c6a8be249a10677b832e7f40dc55
net: qrtr: ns: Free the node during ctrl_cmd_bye()

A node sends the BYE packet when it is about to go down. So the nameserver
should advertise the removal of the node to all remote and local observers
and free the node finally. But currently, the nameserver doesn't free the
node memory even after processing the BYE packet. This causes the node
memory to leak.

Hence, remove the node from Xarray list and free the node memory during
both success and failure case of ctrl_cmd_bye().

Cc: stable@vger.kernel.org
Fixes: 0c2204a4ad71 ("net: qrtr: Migrate nameservice to kernel from userspace")
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
Link: https://patch.msgid.link/20260409-qrtr-fix-v3-3-00a8a5ff2b51@oss.qualcomm.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/qrtr/ns.c