ia64/err-inject: Use get_user_pages_fast()
authorDavidlohr Bueso <dave@stgolabs.net>
Mon, 22 Jan 2018 17:21:37 +0000 (09:21 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 May 2018 05:52:11 +0000 (07:52 +0200)
commit87bcb00aa934e6e48d462dc32e82995d208a7a24
treebcbf19b6b80b2bad947fb979a55c4841456619eb
parentd98ba4f4567ddbd0b4c8b982a43875d39fa46104
ia64/err-inject: Use get_user_pages_fast()

[ Upstream commit 69c907022a7d9325cdc5c9dd064571e445df9a47 ]

At the point of sysfs callback, the call to gup is
done without mmap_sem (or any lock for that matter).
This is racy. As such, use the get_user_pages_fast()
alternative and safely avoid taking the lock, if possible.

Signed-off-by: Davidlohr Bueso <dbueso@suse.de>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/ia64/kernel/err_inject.c