Whamcloud - gitweb
LU-8014 hsm: remove kuc_ispayload 94/19494/3
authorFrank Zago <fzago@cray.com>
Tue, 12 Apr 2016 21:31:07 +0000 (17:31 -0400)
committerOleg Drokin <oleg.drokin@intel.com>
Mon, 25 Apr 2016 04:16:53 +0000 (04:16 +0000)
commit9091a934fcff06538e277d87c3953775e692d9fa
treea33d60ccf00406ea3ff3241d7a0310648a3fd8c8
parent60032c840c3764755861a61a5ffd6d2ccd5446c9
LU-8014 hsm: remove kuc_ispayload

That function takes a pointer, decrements it and dereference the new
address. However we have no idea if the page it's in is
readable or even exists. Such dereference would cause an oops.

That function is only called from mdt_hsm_agent_send, which has itself
2 callers. In the most common case, from mdt_coordinator(), the buffer
passed is already a KUC, but in the less used case, from
hsm_cancel_all_actions(), it is not. Allocating the KUC buffer in
mdt_coordinator() doesn't buy us anything. So remove that code from
the coordinator, which means mdt_hsm_agent_send() is now always called
with a regular buffer, and kuc_ispayload can go.

Signed-off-by: frank zago <fzago@cray.com>
Change-Id: I99c29d4223c14b6fb778215032cd07b6e4676990
Reviewed-on: http://review.whamcloud.com/19494
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Henri Doreau <henri.doreau@cea.fr>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/include/obd_class.h
lustre/mdt/mdt_coordinator.c
lustre/mdt/mdt_hsm_cdt_agent.c
lustre/obdclass/genops.c