Re: [PATCH 1/2] [xarry]:Fixed an issue with memory allocated using the GFP_KERNEL flag in spinlocks

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

 



On Wed, Nov 04, 2020 at 10:32:12AM +0800, xiaofeng.yan wrote:
>  	xa_lock_irq(xa);
> -	curr = __xa_store(xa, index, entry, gfp);
> +	curr = __xa_store(xa, index, entry, GFP_ATOMIC);
>  	xa_unlock_irq(xa);

You haven't actually seen a bug, have you?  You just read the code
wrongly.

void *__xa_store(struct xarray *xa, unsigned long index, void *entry, gfp_t gfp)
...
        } while (__xas_nomem(&xas, gfp));
...
        if (gfpflags_allow_blocking(gfp)) {
                xas_unlock_type(xas, lock_type);
                xas->xa_alloc = kmem_cache_alloc(radix_tree_node_cachep, gfp);
                xas_lock_type(xas, lock_type);




[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