]> git.baikalelectronics.ru Git - kernel.git/commit
staging: lustre: llite: initialize xattr->xe_namelen
authorJames Simmons <jsimmons@infradead.org>
Mon, 16 Apr 2018 04:14:50 +0000 (00:14 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 23 Apr 2018 12:57:40 +0000 (14:57 +0200)
commite50efdfba2fadc18eb2e5a0bb52796b5ed9d4afd
tree7fa7ec63995e68435a87c7515205369ad01c40b8
parent3cfb1a71e0f1340f9d296dc0c17a7cd0aff80680
staging: lustre: llite: initialize xattr->xe_namelen

When the allocation of xattr->xe_name was moved to kstrdup()
setting xattr->xe_namelen was dropped. This field is used
in several parts of the xattr cache code so it broke xattr
handling. Initialize xattr->xe_namelen when allocating
xattr->xe_name succeeds. Also change the debugging statement
to really report the xattr name instead of its length which
wasn't event being set.

Fixes: 95eca4b51691 ("staging: lustre: lustre: llite: Use kstrdup"
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/llite/xattr_cache.c