mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
9p/trans_fd: put worker reqs on destroy
p9_read_work/p9_write_work might still hold references to a req after
having been cancelled; make sure we put any of these to avoid potential
request leak on disconnect.
Fixes: 728356dede ("9p: Add refcount to p9_req_t")
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Dominique Martinet <[email protected]>
Cc: Eric Van Hensbergen <[email protected]>
Cc: Latchesar Ionkov <[email protected]>
Reviewed-by: Tomas Bortoli <[email protected]>
This commit is contained in:
parent
e4ca13f7d0
commit
fb488fc1f2
1 changed files with 8 additions and 0 deletions
|
|
@ -876,7 +876,15 @@ static void p9_conn_destroy(struct p9_conn *m)
|
|||
|
||||
p9_mux_poll_stop(m);
|
||||
cancel_work_sync(&m->rq);
|
||||
if (m->rreq) {
|
||||
p9_req_put(m->rreq);
|
||||
m->rreq = NULL;
|
||||
}
|
||||
cancel_work_sync(&m->wq);
|
||||
if (m->wreq) {
|
||||
p9_req_put(m->wreq);
|
||||
m->wreq = NULL;
|
||||
}
|
||||
|
||||
p9_conn_cancel(m, -ECONNRESET);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue