Whamcloud - gitweb
LU-9856 mdd: handle NULL buffer in mdd_xattr_list() 66/28766/2
authorJohn L. Hammond <john.hammond@intel.com>
Thu, 10 Aug 2017 19:44:24 +0000 (14:44 -0500)
committerJohn L. Hammond <john.hammond@intel.com>
Wed, 6 Sep 2017 16:31:13 +0000 (16:31 +0000)
commit8e2cd001a9640c5e9959341c5af6da680c609eee
tree4bf98d7cd94768d0b4db89bd9997b41b1f810976
parentf64a4508cdbf5af6c90977b7ab3bf9f103489236
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.

Lustre-change: https://review.whamcloud.com/28469
Lustre-commit: 33a4b5ef00e88b33136d09d2f4029223a3c4d681

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