Skip to content

Commit 5f04d29

Browse files
Tomas Bortoligregkh
authored andcommitted
net/9p/trans_fd.c: fix race-condition by flushing workqueue before the kfree()
commit 430ac66 upstream. The patch adds the flush in p9_mux_poll_stop() as it the function used by p9_conn_destroy(), in turn called by p9_fd_close() to stop the async polling associated with the data regarding the connection. Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Tomas Bortoli <[email protected]> Reported-by: [email protected] To: Eric Van Hensbergen <[email protected]> To: Ron Minnich <[email protected]> To: Latchesar Ionkov <[email protected]> Cc: Yiwen Jiang <[email protected]> Cc: [email protected] Signed-off-by: Dominique Martinet <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 312479e commit 5f04d29

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

net/9p/trans_fd.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,8 @@ static void p9_mux_poll_stop(struct p9_conn *m)
185185
spin_lock_irqsave(&p9_poll_lock, flags);
186186
list_del_init(&m->poll_pending_link);
187187
spin_unlock_irqrestore(&p9_poll_lock, flags);
188+
189+
flush_work(&p9_poll_work);
188190
}
189191

190192
/**

0 commit comments

Comments
 (0)