Re: [PATCH 1/3] staging:panel: Rewrite for fixing synchronization issues

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

 



On Thu, Jun 28, 2012 at 10:57:29PM +0200, Zoltan Kelemen wrote:

> Partial rewrite of panel driver to make it more robust. The old code contains
> problems potentially leading to kernel oops, deadlocks and memory leaks.
> 
> The patch contains the following changes:
> * Handle asynchronous attach/detach to/from parport.
> * Proper synchronization of multiple opens to same device.
> * Proper disabling of softirqs when locking pprt from user context.
> * Replaced interruptible_sleep_on in keypad_read to avoid race conditions.
> * Changed to del_timer_sync to make sure timer function finishes before
>   unloading module.
> * Added owner to file_operations to avoid module being unloaded with dangling
>   opens.
> * Check status of user-mode memory write in keypad_read.
> * Check for and handle errors in keypad_init.
> * Properly free memory for logical_inputs to avoid memory leak on unload.
> 

Gar...  Don't do this.  :/  Each bullet point here should be a
separate patch.  Please break it apart and resend.

Put the white space changes and the declaration reshuffles in their
own patch.

Do not create lock_pprt() and unlock_pprt() functions.  It doesn't
save any lines of code.  It means that Sparse is unable check for
locking bugs.  It hides information pointlessly so it's considered
bad style.  The comment is nice though and that should go next to
the declaration of the "pprt_lock" spinlock.

regards,
dan carpenter


_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/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