RE: [PATCH] of: fix of_update_property [v2]

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

 




> > > and the function remains largely identical aside from moving
> > > the __of_find_property() into the spinlock.
> > >
> >
> > But, from the following codes, we can see that, if oldprop !=  NULL
> > Meaning that we have found it, and should just do the updatation later:
> > +++++++++++++++
> > 	oldprop = of_find_property(np, newprop->name, NULL);
> > 	if (!oldprop)
> > 		return of_add_property(np, newprop);
> > ---------------
> >
> >
> >
> > > >  			/* found the node */
> > > >  			newprop->next = oldprop->next;
> > > >  			*next = newprop;
> > > >  			oldprop->next = np->deadprops;
> > > >  			np->deadprops = oldprop;
> > > > -			found = 1;
> >
> > And why the 'found' flag is here is that the oldprop maybe removed
> > just before the spin_lock and after of_find_property().
> >
> > And so use and move __of_find_property() and __of_add_property() into
> > the spinlock could avoid this...
> 
> Isn't that what I said?

Yes, maybe my not thoroughly understanding of your last mail before.

Thanks,

BRs
Xiubo
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux