diff options
author | Roland Dreier <rolandd@cisco.com> | 2007-06-21 11:05:58 -0700 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2007-06-21 11:05:58 -0700 |
commit | 24bce5080306bd5255cbda3d6b09a29d5515b470 (patch) | |
tree | d0061299531d0cda6bd83196f8f4c32c5f93af15 /drivers/w1/slaves | |
parent | d025d7858f7415f558e89d870ad1a205954b64cd (diff) | |
download | op-kernel-dev-24bce5080306bd5255cbda3d6b09a29d5515b470.zip op-kernel-dev-24bce5080306bd5255cbda3d6b09a29d5515b470.tar.gz |
IB/umem: Fix possible hang on process exit
If ib_umem_release() is called after ib_uverbs_close() sets context->closing,
then a process can get stuck in a D state, because the code boils down to
if (down_write_trylock(&mm->mmap_sem))
down_write(&mm->mmap_sem);
which is obviously a stupid instant deadlock. Fix the code so that we
only try to take the lock once.
This bug was introduced in commit f7c6a7b5 ("IB/uverbs: Export
ib_umem_get()/ib_umem_release() to modules") which fortunately never
made it into a release, and was reported by Pete Wyckoff <pw@osc.edu>.
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/w1/slaves')
0 files changed, 0 insertions, 0 deletions