kernel-hacking-2024-linux-s.../drivers/infiniband
Roland Dreier 24bce50803 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>
2007-06-21 11:05:58 -07:00
..
core IB/umem: Fix possible hang on process exit 2007-06-21 11:05:58 -07:00
hw IB/mlx4: Make sure inline data segments don't cross a 64 byte boundary 2007-06-18 09:23:47 -07:00
ulp IPoIB/cm: Fix performance regression on Mellanox 2007-05-29 16:07:09 -07:00
Kconfig [S390] Kconfig: menus with depends on HAS_IOMEM. 2007-05-10 15:46:07 +02:00
Makefile IB/mlx4: Add a driver Mellanox ConnectX InfiniBand adapters 2007-05-08 18:00:38 -07:00