]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
shmdt: use i_size_read() instead of ->i_size
authorDave Hansen <dave.hansen@linux.intel.com>
Sat, 13 Dec 2014 00:58:22 +0000 (16:58 -0800)
committerJiri Slaby <jslaby@suse.cz>
Thu, 9 Apr 2015 11:14:25 +0000 (13:14 +0200)
commit3301500b05e0b060ccc1eb870355530ec7da6778
treeada93a528c445ded87f0c8953fd707092b383281
parenta540d0b8efe895a738793c1f08b6eec12df0bf7c
shmdt: use i_size_read() instead of ->i_size

commit 07a46ed27dc6344de831a450df82336270a157a9 upstream.

Andrew Morton noted

http://lkml.kernel.org/r/20141104142027.a7a0d010772d84560b445f59@linux-foundation.org

that the shmdt uses inode->i_size outside of i_mutex being held.
There is one more case in shm.c in shm_destroy().  This converts
both users over to use i_size_read().

Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Manfred Spraul <manfred@colorfullife.com>
Cc: Davidlohr Bueso <dave@stgolabs.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
ipc/shm.c