Revision 9f141d6ef6258a3a37a045842d9ba7e68f368956 authored by Jan Kara on 19 October 2016, 12:34:31 UTC, committed by Dan Williams on 27 December 2016, 04:29:25 UTC
Currently ->iomap_begin() handler is called with entry lock held. If the
filesystem held any locks between ->iomap_begin() and ->iomap_end()
(such as ext4 which will want to hold transaction open), this would cause
lock inversion with the iomap_apply() from standard IO path which first
calls ->iomap_begin() and only then calls ->actor() callback which grabs
entry locks for DAX (if it faults when copying from/to user provided
buffers).

Fix the problem by nesting grabbing of entry lock inside ->iomap_begin()
- ->iomap_end() pair.

Reviewed-by: Ross Zwisler <ross.zwisler@linux.intel.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
1 parent f449b93
History
File Mode Size
Kconfig -rw-r--r-- 192 bytes
Makefile -rw-r--r-- 203 bytes
atioctl.h -rw-r--r-- 31.0 KB
atvda.h -rw-r--r-- 34.5 KB
esas2r.h -rw-r--r-- 43.4 KB
esas2r_disc.c -rw-r--r-- 28.6 KB
esas2r_flash.c -rw-r--r-- 38.1 KB
esas2r_init.c -rw-r--r-- 46.3 KB
esas2r_int.c -rw-r--r-- 24.1 KB
esas2r_io.c -rw-r--r-- 23.1 KB
esas2r_ioctl.c -rw-r--r-- 51.2 KB
esas2r_log.c -rw-r--r-- 7.6 KB
esas2r_log.h -rw-r--r-- 4.3 KB
esas2r_main.c -rw-r--r-- 47.6 KB
esas2r_targdb.c -rw-r--r-- 7.4 KB
esas2r_vda.c -rw-r--r-- 13.5 KB

back to top