Project

General

Profile

Feature #3399

Updated by Vadim Mutilin about 10 years ago

It is necessary to use semaphore correctly. This rule checks usage of the functions: functions  
 up_read, down_read, up_write, down_write, down_read_trylock, down_write_trylock, downgrade_write, down_read_nested, down_write_nested. 

 *    - multiple write locks are not permitted 
    - multiple write unlocks are not permitted 
 

 *    - read lock is not permitted after write lock 
 

 *    - write lock is not permitted after read lock 
 

 *    - read and write locks must be free at the end 

 Commit 82163edcdf on torvalds fix the last one. 

 *Links* 
 Sample bugfixes "506218e":https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/commit/?id=506218e, "de79143":https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/commit/?id=de79143 

Back