All of lore.kernel.org
 help / color / mirror / Atom feed
* [cgroup:for-next 5/6] fs/xattr.c:882 __simple_xattr_set() error: potential NULL dereference 'new_xattr'.
@ 2012-09-12  2:28 ` Fengguang Wu
  0 siblings, 0 replies; 10+ messages in thread
From: Fengguang Wu @ 2012-09-12  2:28 UTC (permalink / raw)
  To: Aristeu Rozanski
  Cc: kernel-janitors-u79uwXL29TY76Z2rM5mHXA, Tejun Heo,
	cgroups-u79uwXL29TY76Z2rM5mHXA, Dan Carpenter

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-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>                     Intel Corporation

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2012-09-12 18:42 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-12  2:28 [cgroup:for-next 5/6] fs/xattr.c:882 __simple_xattr_set() error: potential NULL dereference 'new_xattr' Fengguang Wu
2012-09-12  2:28 ` [cgroup:for-next 5/6] fs/xattr.c:882 __simple_xattr_set() error: potential NULL dereference 'new_xat Fengguang Wu
2012-09-12  7:55 ` [cgroup:for-next 5/6] fs/xattr.c:882 __simple_xattr_set() error: potential NULL dereference 'new_xattr' Dan Carpenter
2012-09-12  7:55   ` [cgroup:for-next 5/6] fs/xattr.c:882 __simple_xattr_set() error: potential NULL dereference 'new Dan Carpenter
2012-09-12 13:40   ` [cgroup:for-next 5/6] fs/xattr.c:882 __simple_xattr_set() error: potential NULL dereference 'new_xattr' Aristeu Rozanski
2012-09-12 13:40     ` [cgroup:for-next 5/6] fs/xattr.c:882 __simple_xattr_set() error: potential NULL dereference 'new Aristeu Rozanski
2012-09-12 14:31   ` [PATCH] xattr: mark variable as uninitialized to make both gcc and smatch happy Aristeu Rozanski
2012-09-12 14:31     ` Aristeu Rozanski
     [not found]     ` <20120912143112.GE19694-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2012-09-12 18:42       ` Tejun Heo
2012-09-12 18:42         ` Tejun Heo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.