Re: [PATCH -mm] slab: update_memcg_params: explicitly check that old array != NULL

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

 



On Mon, Jan 26, 2015 at 01:45:34PM +0300, Vladimir Davydov wrote:
> On Mon, Jan 26, 2015 at 01:23:05PM +0300, Dan Carpenter wrote:
> > On Mon, Jan 26, 2015 at 01:01:19PM +0300, Vladimir Davydov wrote:
> > > This warning is false-positive, because @old equals NULL iff
> > > @memcg_nr_cache_ids equals 0.
> > 
> > I don't see how it could be a false positive.  The "old" pointer is
> > dereferenced inside the call to memset() so unless memset is a macro the
> > compiler isn't going to optimize the dereference away.
> 
> old->entries is not dereferenced: memcg_cache_array->entries is not a
> pointer - it is embedded to the memcg_cache_array struct.

Ah.  Ok.  Thanks.

regards,
dan carpenter

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]