Re: [PATCH] xattr: mark variable as uninitialized to make both gcc and smatch happy

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

 



On Wed, Sep 12, 2012 at 10:31:13AM -0400, Aristeu Rozanski wrote:
> new_xattr in __simple_xattr_set() is only initialized with a valid
> pointer if value is not NULL, which only happens if this function is
> called directly with the intention to remove an existing extended
> attribute. Even being safe to be this way, smatch warns about possible
> NULL dereference. Dan Carpenter suggested using uninitialized_var()
> which will make both gcc and smatch happy.
> 
> Cc: Fengguang Wu <fengguang.wu@xxxxxxxxx>
> Cc: Tejun Heo <tj@xxxxxxxxxx>
> Cc: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
> Signed-off-by: Aristeu Rozanski <aris@xxxxxxxxxx>

applied to cgroup/for-3.7. Thanks.

-- 
tejun
--
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