Re: [PATCH 7/7] Fix double call to pthread_mutex_unlock in diskfs_S_ifsock_getsockaddr.

2012-12-16 Thread Samuel Thibault
Cyril Roelandt, le Mon 17 Dec 2012 00:51:30 +0100, a écrit : > * libdiskfs/ifsock.c (diskfs_S_ifsock_getsockaddr): remove a redundant call to > pthread_mutex_unlock. Obviously enough, ouch! Samuel

Re: [PATCH 6/7] Fix double call to pthread_mutex_unlock in diskfs_rename_dir().

2012-12-16 Thread Samuel Thibault
Cyril Roelandt, le Mon 17 Dec 2012 00:51:29 +0100, a écrit : > * libdiskfs/dir-renamed.c (diskfs_rename_dir): remove a redundant call to > pthread_mutex_unlock. > > Signed-off-by: Cyril Roelandt > --- > libdiskfs/dir-renamed.c |2 -- > 1 file changed, 2 deletions(-) > > diff --git a/libdisk

Re: [PATCH 5/7] Fix double call to pthread_mutex_unlock in _treefs_s_dir_lookup.

2012-12-16 Thread Samuel Thibault
Cyril Roelandt, le Mon 17 Dec 2012 00:51:28 +0100, a écrit : > * libtreefs/dir-lookup.c (_treefs_s_dir_lookup): remove a redundant call to > pthread_mutex_unlock. > > Signed-off-by: Cyril Roelandt > --- > libtreefs/dir-lookup.c |1 - > 1 file changed, 1 deletion(-) > > diff --git a/libtreef

Re: [PATCH 4/7] Fix double call to pthread_mutex_unlock in S_socket_connect.

2012-12-16 Thread Samuel Thibault
Cyril Roelandt, le Mon 17 Dec 2012 00:51:27 +0100, a écrit : > * pflocal/socker.c (S_socket_connect): fix redundant call to > pthread_mutex_unlock. There is no need to hold sock->lock to call > connq_connect_cancel, and sock->lock must be taken when leaving the if/else > blocks. Indeed, thanks! S

Re: [PATCH 3/7] Fix double call to pthread_mutex_unlock in repeat_event().

2012-12-16 Thread Samuel Thibault
Cyril Roelandt, le Mon 17 Dec 2012 00:51:26 +0100, a écrit : > * console-client/pc-mouse.c (repeat_event): remove a redundant call to > pthread_mutex_unlock. Ditto. Samuel

Re: [PATCH 2/7] Fix double call to pthread_mutex_unlock in kbd_repeat_key().

2012-12-16 Thread Samuel Thibault
Cyril Roelandt, le Mon 17 Dec 2012 00:51:25 +0100, a écrit : >pthread_mutex_lock (&global_lock); >while (kbdbuf.size + sizeof (kd_event) > KBDBUFSZ) > { > - /* The input buffer is full, wait until there is some space. */ > - if (pthread_hurd_cond_wait_np (&kbdbuf.writecond,

Re: [PATCH 1/7] Fix double call to pthread_mutex_unlock in console_move_mouse().

2012-12-16 Thread Samuel Thibault
Cyril Roelandt, le Mon 17 Dec 2012 00:51:24 +0100, a écrit : > * console-client/console.c (console_move_mouse): remove a redundant call to > pthread_mutex_unlock(). Obviously! Thanks! Samuel

[PATCH 6/7] Fix double call to pthread_mutex_unlock in diskfs_rename_dir().

2012-12-16 Thread Cyril Roelandt
* libdiskfs/dir-renamed.c (diskfs_rename_dir): remove a redundant call to pthread_mutex_unlock. Signed-off-by: Cyril Roelandt --- libdiskfs/dir-renamed.c |2 -- 1 file changed, 2 deletions(-) diff --git a/libdiskfs/dir-renamed.c b/libdiskfs/dir-renamed.c index 3990b13..7829373 100644 --- a/

[PATCH 7/7] Fix double call to pthread_mutex_unlock in diskfs_S_ifsock_getsockaddr.

2012-12-16 Thread Cyril Roelandt
* libdiskfs/ifsock.c (diskfs_S_ifsock_getsockaddr): remove a redundant call to pthread_mutex_unlock. Signed-off-by: Cyril Roelandt --- libdiskfs/ifsock.c |5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/libdiskfs/ifsock.c b/libdiskfs/ifsock.c index 1da81b8..9199fdf 1006

[PATCH 5/7] Fix double call to pthread_mutex_unlock in _treefs_s_dir_lookup.

2012-12-16 Thread Cyril Roelandt
* libtreefs/dir-lookup.c (_treefs_s_dir_lookup): remove a redundant call to pthread_mutex_unlock. Signed-off-by: Cyril Roelandt --- libtreefs/dir-lookup.c |1 - 1 file changed, 1 deletion(-) diff --git a/libtreefs/dir-lookup.c b/libtreefs/dir-lookup.c index ce2acaf..41c34ea 100644 --- a/lib

[PATCH 4/7] Fix double call to pthread_mutex_unlock in S_socket_connect.

2012-12-16 Thread Cyril Roelandt
* pflocal/socker.c (S_socket_connect): fix redundant call to pthread_mutex_unlock. There is no need to hold sock->lock to call connq_connect_cancel, and sock->lock must be taken when leaving the if/else blocks. Signed-off-by: Cyril Roelandt --- pflocal/socket.c |2 +- 1 file changed, 1 inser

[PATCH 3/7] Fix double call to pthread_mutex_unlock in repeat_event().

2012-12-16 Thread Cyril Roelandt
* console-client/pc-mouse.c (repeat_event): remove a redundant call to pthread_mutex_unlock. Signed-off-by: Cyril Roelandt --- console-client/pc-mouse.c |9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/console-client/pc-mouse.c b/console-client/pc-mouse.c index 1b7

[PATCH 2/7] Fix double call to pthread_mutex_unlock in kbd_repeat_key().

2012-12-16 Thread Cyril Roelandt
* console-client/kbd-repeat.c (kbd_repeat_key): remove a redundant call to pthread_mutex_unlock. Signed-off-by: Cyril Roelandt --- console-client/kbd-repeat.c |9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/console-client/kbd-repeat.c b/console-client/kbd-repeat.c

[PATCH 1/7] Fix double call to pthread_mutex_unlock in console_move_mouse().

2012-12-16 Thread Cyril Roelandt
* console-client/console.c (console_move_mouse): remove a redundant call to pthread_mutex_unlock(). Signed-off-by: Cyril Roelandt --- console-client/console.c |2 -- 1 file changed, 2 deletions(-) diff --git a/console-client/console.c b/console-client/console.c index 806bec6..7c9a880 100644

[PATCH 0/7][Needs testing] Fix double mutex unlocks.

2012-12-16 Thread Cyril Roelandt
Hi! This patch series fixes double calls to pthread_mutex_unlock(), found using the following Coccinelle script (http://coccinelle.lip6.fr/): @@ expression E; identifier f; @@ f(...) { ... * pthread_mutex_unlock(E); ...when != pthread_mutex_lock(E); when != error(...); * pthread_mutex_unloc

Re: [BUG] ps hangs when given "-o user".

2012-12-16 Thread Samuel Thibault
Indeed, applied, thanks! Samuel

Re: Questions about patches for hurdselect.c

2012-12-16 Thread Samuel Thibault
Svante Signell, le Wed 12 Dec 2012 20:11:55 +0100, a écrit : > --- hurdselect_orig.c 2012-10-21 22:55:26.0 +0200 > +++ hurdselect_step1.c2012-12-12 19:29:26.0 +0100 > @@ -37,6 +37,13 @@ > each of READFDS, WRITEFDS, EXCEPTFDS that is nonnull. If TIMEOUT is not > NULL

Re: Add EPIPE error return in pflocal/io.c:io_select() [Was: ...]

2012-12-16 Thread Samuel Thibault
Hello, Svante Signell, le Fri 23 Nov 2012 13:18:18 +0100, a écrit : > (Is the title better?) Yes. > Updated patch attached. I had to rework it quite a bit: not only the mutex had to be unlocked, but also this: > pipe_acquire_reader (read_pipe); so in the end I dropped the return entir