Re: [PATCH v4 5/7] cxl/region: Introduce SOFT RESERVED resource removal on region teardown

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

 



Hi Smita,

> >> +/*
> >> + * normalize_resource
> >> + *
> >> + * The walk_iomem_res_desc() returns a copy of a resource, not a reference
> >> + * to the actual resource in the iomem_resource tree. As a result,
> >> + * __release_resource() which relies on pointer equality will fail.  
> > 
> > Probably want some statement on why nothing can race with this give
> > the resource_lock is not being held.  
> 
> Hmm, probably you are right that normalize_resource() is accessing the 
> resource tree without holding resource_lock, which could lead to races.
> 
> I will update the function to take a read_lock(&resource_lock) before 
> walking res->parent->child..
> 
> Let me know if you'd prefer this locking be handled before calling 
> normalize_resource() instead..
I don't mind either way - see what looks better to you.





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

  Powered by Linux