update_lock

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

 



On Sat, Mar 20, 2004 at 06:49:09PM +0100, Jean Delvare wrote:
> Hi all,
> 
> I have a question about the locking mechanism we have in all our i2c
> client drivers, 2.4 and 2.6 as well.
> 
> The data->update_lock semaphore is used in the *_update_dev function,
> and only there. There are various other places all over the drivers
> where we access the same internal data, (in get callback functions) and
> even write to it (in store callback functions typically), and also
> access the i2c bus (in store functions too).
> 
> Why is it that we don't use the lock here?
> 
> What are we trying to protect exactly?

I remember trying to figure this out a while ago too, and didn't come up
with an answer.  I sent in some patches that I thought were correct, but
others said no.

It would be good to figure this out.

thanks,

greg k-h



[Index of Archives]     [Linux Kernel]     [Linux Hardware Monitoring]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux