Re: [PATCH v3] staging: dgnc: take lock when storing value in dgnc_poll_tick

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

 



On Tue, Sep 22, 2015 at 11:48:05AM +0100, Salah Triki wrote:
> >On Wed, 2 Sep 2015 18:15:29 -0700, Greg KH wrote:
> >>On Tue, Aug 25, 2015 at 08:09:47PM +0100, Salah Triki wrote:
> >> poll_tick is declared global, so dgnc_driver_pollrate_store needs to
> >> take
> >> the lock dgnc_poll_lock before modifying this variable. dgnc_poll_lock
> >> the
> >> appropriate lock, since it is intended for poll scheduling and
> >> dgnc_poll_tick
> >> contains the poll rate. dgnc_poll_lock needs to be declared not static
> >> and
> >> extern in order to be visible for dgnc_driver_pollrate_store.
> >
> >So you only lock it if you change the value?  That's not the way to do
> >this type of change :(
> 
> The reads access to dgnc_poll_tick are protected.

protected with what?  I don't see the patch here and do not even
remember what it contained to be able to answer this, sorry.

Please resend if you think it is correct.

greg k-h
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux