]> git.baikalelectronics.ru Git - kernel.git/commit
dax: Don't access a freed inode
authorMatthew Wilcox <willy@infradead.org>
Tue, 27 Nov 2018 21:16:34 +0000 (13:16 -0800)
committerDan Williams <dan.j.williams@intel.com>
Wed, 28 Nov 2018 19:08:42 +0000 (11:08 -0800)
commit6c1544b0a135165b0a284cbbc56022ed2e86a251
tree6d4ea9c78b457d2b894d11c58af2798b09a8746c
parentad7624994fc597b2c368fe29078a5500f74ea1c5
dax: Don't access a freed inode

After we drop the i_pages lock, the inode can be freed at any time.
The get_unlocked_entry() code has no choice but to reacquire the lock,
so it can't be used here.  Create a new wait_entry_unlocked() which takes
care not to acquire the lock or dereference the address_space in any way.

Fixes: 0313a0617f85 ("filesystem-dax: Introduce dax_lock_mapping_entry()")
Cc: <stable@vger.kernel.org>
Signed-off-by: Matthew Wilcox <willy@infradead.org>
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
fs/dax.c