]> git.baikalelectronics.ru Git - kernel.git/commit
net: 9p: fix refcount leak in p9_read_work() error handling
authorHangyu Hua <hbh25y@gmail.com>
Wed, 13 Jul 2022 00:55:11 +0000 (09:55 +0900)
committerDominique Martinet <asmadeus@codewreck.org>
Fri, 15 Jul 2022 11:22:21 +0000 (20:22 +0900)
commit87a26539b580c4377f982733d21c51dce99e4c11
treedb109559de7b8c0616e73565279d7837f28fae18
parenta6f94c3a7c4847815cd848494b15c872562d4f8c
net: 9p: fix refcount leak in p9_read_work() error handling

p9_req_put need to be called when m->rreq->rc.sdata is NULL to avoid
temporary refcount leak.

Link: https://lkml.kernel.org/r/20220712104438.30800-1-hbh25y@gmail.com
Fixes: 10f61be1685d ("9p: Add refcount to p9_req_t")
Signed-off-by: Hangyu Hua <hbh25y@gmail.com>
[Dominique: commit wording adjustments, p9_req_put argument fixes for rebase]
Signed-off-by: Dominique Martinet <asmadeus@codewreck.org>
net/9p/trans_fd.c