浏览代码

make xattr_resolve_handlers() safe to use with NULL ->s_xattr

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Al Viro 9 年之前
父节点
当前提交
0040773bff
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      fs/xattr.c

+ 1 - 0
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)++)