Whamcloud - gitweb
LU-4194 ldlm: Make OBD_[ALLOC|FREE]_LARGE use consistent 98/8298/2
authorChristopher J. Morrone <morrone2@llnl.gov>
Fri, 15 Nov 2013 21:40:19 +0000 (13:40 -0800)
committerOleg Drokin <oleg.drokin@intel.com>
Mon, 2 Dec 2013 12:06:50 +0000 (12:06 +0000)
commit9c4d506c5feae8023b49781b31b25b8ef3f8123f
tree5c97e1cb6b52d78706b0bbe38caf752a538a5f97
parentcf9971915b55d51b6f186f4a2b5a12596d8bf675
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