Whamcloud - gitweb
LU-4194 ldlm: Make OBD_[ALLOC|FREE]_LARGE use consistent
authorChristopher J. Morrone <morrone2@llnl.gov>
Fri, 15 Nov 2013 21:40:19 +0000 (13:40 -0800)
committerOleg Drokin <oleg.drokin@intel.com>
Fri, 7 Feb 2014 04:14:48 +0000 (23:14 -0500)
commit7c4cba594d9004eaef1b32e1a892e6b35ad2abf3
tree437f25fea11abb21ecb279250d0b8bfeb44479af
parente2d57bc9690032757f21cbb28f97536279a434f4
LU-4194 ldlm: Make OBD_[ALLOC|FREE]_LARGE use consistent

struct ldlm_lock's l_lvb_data field is freed in ldlm_lock_put()
using OBD_FREE.  However, some other code paths can attach
a buffer to l_lvb_data that was allocated using OBD_ALLOC_LARGE.
This can lead to a kfree() of a vmalloc()ed buffer, which can
trigger a kernel Oops.

Change-Id: Ic75a67530862eeb4d065c14bbbac80939bff5731
Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov>
Reviewed-on: http://review.whamcloud.com/8298
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Faccini Bruno <bruno.faccini@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
lustre/ldlm/ldlm_lock.c
lustre/ldlm/ldlm_lockd.c