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.