From: Al Viro Date: Wed, 25 May 2016 21:34:41 +0000 (-0400) Subject: make xattr_resolve_handlers() safe to use with NULL ->s_xattr X-Git-Tag: v4.7-rc1~51^2 X-Git-Url: http://git.cascardo.eti.br/?a=commitdiff_plain;h=0040773bff7b585fc948565a0558e5a6a4680e96;p=cascardo%2Flinux.git make xattr_resolve_handlers() safe to use with NULL ->s_xattr Signed-off-by: Al Viro --- diff --git a/fs/xattr.c b/fs/xattr.c index 4231488f2122..fc81e771488a 100644 --- a/fs/xattr.c +++ b/fs/xattr.c @@ -655,6 +655,7 @@ strcmp_prefix(const char *a, const char *a_prefix) * operations to the correct xattr_handler. */ #define for_each_xattr_handler(handlers, handler) \ + if (handlers) \ for ((handler) = *(handlers)++; \ (handler) != NULL; \ (handler) = *(handlers)++)