[cgroup:for-next 5/6] fs/xattr.c:882 __simple_xattr_set() error: potential NULL dereference 'new_xattr'.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Aristeu,

FYI, there are new smatch warnings show up in

tree:   git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup.git for-next
head:   9814e970d7947dcc5ab7b37a53514c0098bfacc9
commit: 38f38657444d15e1a8574eae80ed3de9f501737a xattr: extract simple_xattr code from tmpfs


fs/xattr.c:882 __simple_xattr_set() error: potential NULL dereference 'new_xattr'.

vim +882 fs/xattr.c
   872				} else {
   873					list_del(&xattr->list);
   874				}
   875				goto out;
   876			}
   877		}
   878		if (flags & XATTR_REPLACE) {
   879			xattr = new_xattr;
   880			err = -ENODATA;
   881		} else {
 > 882			list_add(&new_xattr->list, &xattrs->head);
   883			xattr = NULL;
   884		}
   885	out:
   886		spin_unlock(&xattrs->lock);
   887		if (xattr) {
   888			kfree(xattr->name);
   889			kfree(xattr);
   890		}
   891		return err;
   892	

---
0-DAY kernel build testing backend         Open Source Technology Centre
Fengguang Wu <wfg@xxxxxxxxxxxxxxx>                     Intel Corporation
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux