Thread (6 messages) flat view 6 messages, 4 authors, 2025-08-12

Re: [PATCH net-next] net: kcm: Fix race condition in kcm_unattach()

From: Sven Stegemann <hidden>
Date: 2025-08-12 19:27:03
Also in: lkml

On 8/12/2025 2:54 PM, Paolo Abeni wrote:
On 8/9/25 8:36 AM, Sven Stegemann wrote:
quoted
@@ -1714,6 +1708,7 @@ static int kcm_release(struct socket *sock)
 	/* Cancel work. After this point there should be no outside references
 	 * to the kcm socket.
 	 */
+	disable_work(&kcm->tx_work);
 	cancel_work_sync(&kcm->tx_work);
The patch looks functionally correct, but I guess it would be cleaner
simply replacing:

	cancel_work_sync(&kcm->tx_work);

with:

	disable_work_sync(&kcm->tx_work);
Thank you, that's a good point.

I just submitted a cleaned up version of the patch.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help