Re: [PATCH] xattr: NULL initialize name in simple_xattr_alloc

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

 



On Mon, Mar 09, 2020 at 12:30:07PM -0700, Joe Perches wrote:
> On Mon, 2020-03-09 at 11:37 -0700, Daniel Xu wrote:
> > It's preferable to initialize structs to a deterministic state.
> 
> Thanks Daniel.

Not much point, TBH - there are only two callers, both assigning
that field very shortly.  If you want to do it, do it right -
make that
	simple_xattr_alloc(name, value, len)
with kfree(name) done on failure.  And make the callers allocate
the name first.  Simpler cleanup rules on failure exits that
way...



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux