]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
net/9p/trans_fd.c: fix race by holding the lock
authorTomas Bortoli <tomasbortoli@gmail.com>
Mon, 23 Jul 2018 18:42:53 +0000 (20:42 +0200)
committerJuerg Haefliger <juergh@canonical.com>
Wed, 24 Jul 2019 01:46:34 +0000 (19:46 -0600)
commit3fb3eb291ea62c6255a6007cde389d2babdaf958
treea388a3264df549f6ed422ec4a42c57ee76dfabd1
parente754a79b833a165ca5ea8bd689515ab8a1fbcb0b
net/9p/trans_fd.c: fix race by holding the lock

BugLink: https://bugs.launchpad.net/bugs/1835972
[ Upstream commit 9f476d7c540cb57556d3cc7e78704e6cd5100f5f ]

It may be possible to run p9_fd_cancel() with a deleted req->req_list
and incur in a double del. To fix hold the client->lock while changing
the status, so the other threads will be synchronized.

Link: http://lkml.kernel.org/r/20180723184253.6682-1-tomasbortoli@gmail.com
Signed-off-by: Tomas Bortoli <tomasbortoli@gmail.com>
Reported-by: syzbot+735d926e9d1317c3310c@syzkaller.appspotmail.com
To: Eric Van Hensbergen <ericvh@gmail.com>
To: Ron Minnich <rminnich@sandia.gov>
To: Latchesar Ionkov <lucho@ionkov.net>
Cc: Yiwen Jiang <jiangyiwen@huwei.com>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Dominique Martinet <dominique.martinet@cea.fr>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
net/9p/trans_fd.c