[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 0/7][Needs testing] Fix double mutex unlocks.
From: |
Cyril Roelandt |
Subject: |
[PATCH 0/7][Needs testing] Fix double mutex unlocks. |
Date: |
Mon, 17 Dec 2012 00:51:23 +0100 |
Hi!
This patch series fixes double calls to pthread_mutex_unlock(), found using the
following Coccinelle script (http://coccinelle.lip6.fr/):
<spml>
@@
expression E;
identifier f;
@@
f(...)
{
...
* pthread_mutex_unlock(E);
...when != pthread_mutex_lock(E);
when != error(...);
* pthread_mutex_unlock(E);
...
}
</spml>
Since this script can easily generate false positives, I checked its output by
hand and tried to provides fixes. I haven't tested them though, and am not
familiar with the code, so they will probably need to be carefully reviewed.
WBR,
Cyril Roelandt.
---
Cyril Roelandt (7):
Fix double call to pthread_mutex_unlock in console_move_mouse().
Fix double call to pthread_mutex_unlock in kbd_repeat_key().
Fix double call to pthread_mutex_unlock in repeat_event().
Fix double call to pthread_mutex_unlock in S_socket_connect.
Fix double call to pthread_mutex_unlock in _treefs_s_dir_lookup.
Fix double call to pthread_mutex_unlock in diskfs_rename_dir().
Fix double call to pthread_mutex_unlock in
diskfs_S_ifsock_getsockaddr.
console-client/console.c | 2 --
console-client/kbd-repeat.c | 9 +++------
console-client/pc-mouse.c | 9 +++------
libdiskfs/dir-renamed.c | 2 --
libdiskfs/ifsock.c | 5 +----
libtreefs/dir-lookup.c | 1 -
pflocal/socket.c | 2 +-
7 files changed, 8 insertions(+), 22 deletions(-)
--
1.7.10.4
- [PATCH 0/7][Needs testing] Fix double mutex unlocks.,
Cyril Roelandt <=
- [PATCH 1/7] Fix double call to pthread_mutex_unlock in console_move_mouse()., Cyril Roelandt, 2012/12/16
- [PATCH 2/7] Fix double call to pthread_mutex_unlock in kbd_repeat_key()., Cyril Roelandt, 2012/12/16
- [PATCH 3/7] Fix double call to pthread_mutex_unlock in repeat_event()., Cyril Roelandt, 2012/12/16
- [PATCH 4/7] Fix double call to pthread_mutex_unlock in S_socket_connect., Cyril Roelandt, 2012/12/16
- [PATCH 5/7] Fix double call to pthread_mutex_unlock in _treefs_s_dir_lookup., Cyril Roelandt, 2012/12/16