Re: [PATCH V2] 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, Aug 25, 2015 at 08:44:39AM +0100, Salah Triki wrote:
> On Mon, Aug 24, 2015 at 06:16:21PM +0530, Sudip Mukherjee wrote:
> > On Wed, Aug 19, 2015 at 07:11:55PM +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 is
> > > 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.
> > > 
> > > Signed-off-by: Salah Triki <salah.triki@xxxxxxx>
> > > ---
> > <snip>
> > > +
> > > +	spin_lock_irqsave(&dgnc_poll_lock, flags);
> > > +	dgnc_poll_tick = tick;
> > > +	spin_unlock_irqstore(&dgnc_poll_lock, flags);
> > Have you build tested it?
> > 
> > regards
> > sudip
> 
> no
> 
> regards
> --
> salah triki

The patch failed to build. I will send the new version soon.

best regards
--
salah triki
_______________________________________________
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