Whamcloud - gitweb
LU-8258 nodemap: fix userspace address access in proc code 57/21857/3
authorKit Westneat <kit.westneat@gmail.com>
Wed, 10 Aug 2016 16:41:48 +0000 (12:41 -0400)
committerOleg Drokin <oleg.drokin@intel.com>
Mon, 15 Aug 2016 21:12:45 +0000 (21:12 +0000)
commit288e55b8a38222af843a71a89df90234a72d8e0d
treea9d1c3e00c1bc75f47a94ccab1605957dc7183f0
parent957df6f030e8c89b02b168776d237dbb6879073b
LU-8258 nodemap: fix userspace address access in proc code

The fileset proc write handler was incorrectly passing the userspace
buffer address directly to the nodemap code. This patch copies it to
kernel space before passing it.  Because the buffer could be greater
than 2k, allocate the buffer off stack.

Signed-off-by: Kit Westneat <kit.westneat@gmail.com>
Change-Id: If90c1a95c80b2afd2a4cf6a70dc41d28dd157a2f
Reviewed-on: http://review.whamcloud.com/21857
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/ptlrpc/nodemap_lproc.c