Whamcloud - gitweb
LU-9856 mdd: handle NULL buffer in mdd_xattr_list() 69/28469/2
authorJohn L. Hammond <john.hammond@intel.com>
Thu, 10 Aug 2017 19:44:24 +0000 (14:44 -0500)
committerOleg Drokin <oleg.drokin@intel.com>
Mon, 28 Aug 2017 06:26:49 +0000 (06:26 +0000)
commit33a4b5ef00e88b33136d09d2f4029223a3c4d681
tree5c7c09f291479c9c9bb4784322366ff79b3d5f28
parent0568e93539ebc1bbec601182f9faba4d43ed106b
LU-9856 mdd: handle NULL buffer in mdd_xattr_list()

The upper layer may call mdd_xattr_list() with a NULL buffer to get
the length of the xattr name list. Handle this case safely by skipping
the removal of the link xattr for unlinked objects.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Iae87fba20325b228ef75ee762acfa49353932b1b
Reviewed-on: https://review.whamcloud.com/28469
Tested-by: Jenkins
Reviewed-by: Andrew Perepechko <andrew.perepechko@seagate.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/mdd/mdd_object.c