[PATCH v3 0/1] staging: dgnc: take lock when storing value in dgnc_poll_tick

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

 



The global variable dgnc_poll_tick is read in the function dgnc_poll_handler 
and modified in  dgnc_driver_pollrate_store. The read access is protected by 
spin_lock_irqsave whereas the write is not. The protection of write access 
is needed, since it is possible to have multiple programs that try to modify, 
simultaneously, dngc_poll_tick. The following patch corrects this bug.

Salah Triki (1):
  staging: dgnc: take lock when storing value in dgnc_poll_tick

 drivers/staging/dgnc/dgnc_driver.c | 2 +-
 drivers/staging/dgnc/dgnc_driver.h | 1 +
 drivers/staging/dgnc/dgnc_sysfs.c  | 9 ++++++++-
 3 files changed, 10 insertions(+), 2 deletions(-)

-- 
1.9.1

_______________________________________________
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