Re: [PATCH 14/14] mach-defpager: remove unused variables

2013-11-09 Thread Samuel Thibault
Justus Winter, le Fri 08 Nov 2013 21:24:22 +0100, a écrit : > Found using the Clang Static Analyzer. > > * mach-defpager/default_pager.c (seqnos_memory_object_terminate): > Remove unused variables request_refs and name_refs. Ack > --- > mach-defpager/default_pager.c |3 --- > 1 file chang

Re: [PATCH 13/14] mach-defpager: include errno.h

2013-11-09 Thread Samuel Thibault
Justus Winter, le Fri 08 Nov 2013 21:24:21 +0100, a écrit : > Define _GNU_SOURCE and include errno.h so that the type error_t is > defined. > > * mach-defpager/default_pager.c: Define _GNU_SOURCE and include errno.h. Isn't _GNU_SOURCE already defined on the build command line? Including errno.h

Re: [PATCH 12/14] mach-defpager: turn dealloc_direct into a normal function

2013-11-09 Thread Samuel Thibault
Justus Winter, le Fri 08 Nov 2013 21:24:20 +0100, a écrit : > * mach-defpager/default_pager.c (dealloc_direct): Move function > definition outside of pager_truncate. Ack. > --- > mach-defpager/default_pager.c | 45 > + > 1 file changed, 23 insertions(

Re: [PATCH 11/14] auth: fix use of uninitialized variable err

2013-11-09 Thread Samuel Thibault
Justus Winter, le Fri 08 Nov 2013 21:24:19 +0100, a écrit : > Previously a plausible execution path existed so the value of err was > undefined at the end of the function, making the function return > arbitrary error values. Fix this by initializing it to 0. > > Found using the Clang Static Analyz

Re: [PATCH 10/14] init: fix memory leak

2013-11-09 Thread Samuel Thibault
Justus Winter, le Fri 08 Nov 2013 21:24:18 +0100, a écrit : > Found using the Clang Static Analyzer. > > * init/init.c (process_signal): Fix memory leak. Ack. > --- > init/init.c |1 + > 1 file changed, 1 insertion(+) > > diff --git a/init/init.c b/init/init.c > index 94f1a9b..de5dd6b 1006

Re: [PATCH 09/14] proc: fix error handling in S_proc_exception_raise

2013-11-09 Thread Samuel Thibault
Justus Winter, le Fri 08 Nov 2013 21:24:17 +0100, a écrit : > Found using the Clang Static Analyzer. > > * proc/mgt.c (S_proc_exception_raise): Fix error propagation. Ack. > --- > proc/mgt.c |2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/proc/mgt.c b/proc/mgt.c > index 4da2216..

Re: [PATCH 08/14] proc: fix a use-after-free error

2013-11-09 Thread Samuel Thibault
Justus Winter, le Fri 08 Nov 2013 21:24:16 +0100, a écrit : > If we have to create a new process group, we have to do this before > leaving the current one. The current process group is deallocated if > the process is the last process in that group. Likewise, if the > current group was the last gro

Re: [PATCH 07/14] proc: fix the declaraton of genpid

2013-11-09 Thread Samuel Thibault
Justus Winter, le Fri 08 Nov 2013 21:24:15 +0100, a écrit : > * proc/proc.h (genpid): Fix declaration. Ack. > --- > proc/proc.h |2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/proc/proc.h b/proc/proc.h > index 5615f77..dcfc0db 100644 > --- a/proc/proc.h > +++ b/proc/

Re: [PATCH 06/14] proc: turn {init, add}str, compare_versions into normal functions

2013-11-09 Thread Samuel Thibault
Justus Winter, le Fri 08 Nov 2013 21:24:14 +0100, a écrit : > +static char *ru_p; > +static char *ru_end; This is really no good, a showstopper for me. Samuel

Re: [PATCH 04/14] proc: turn count_up and store_pid into normal functions

2013-11-09 Thread Samuel Thibault
Justus Winter, le Fri 08 Nov 2013 21:24:12 +0100, a écrit : > Previously count_up and store_pid were defined inside > S_proc_getallpids. Move them out of that function and declare them > static. > > * proc/mgt.c: Turn count_up and store_pid into normal functions. > --- > proc/mgt.c | 24 +++

Re: [PATCH 03/14] proc: remove declaration of nested functions from proc.h

2013-11-09 Thread Samuel Thibault
Justus Winter, le Fri 08 Nov 2013 21:24:11 +0100, a écrit : > Remove the declaration of count_up and strore_pid from proc.h. The > functions are defined as nested functions in S_proc_getallpids, there > is no need to declare them. Furthermore, the declaration does not > match the definition. Ack

Re: [PATCH 02/14] libtrivfs: improve the out of memory handling in add_el

2013-11-09 Thread Samuel Thibault
Justus Winter, le Fri 08 Nov 2013 21:24:10 +0100, a écrit : > add_el reallocs two memory regions. If at least one of the operation > fails, free any region that was successfully resized. Also release the > lock. > > Found using the Clang Static Analyzer. > > * libtrivfs/dyn-classes.c (add_el): Im

Re: [PATCH 01/14] term: fix error handling in hurdio_mdmctl

2013-11-09 Thread Samuel Thibault
Justus Winter, le Fri 08 Nov 2013 21:24:09 +0100, a écrit : > hurdio_mdmctl allows one to set and clear bits from the modem control > bit vector. However, plausible code paths exist that leave oldbits > uninitialized. Fix this by returning an error instead if retrieving > the oldbits failed and the

Re: [PATCH] Remove lint code

2013-11-09 Thread Samuel Thibault
Applied, thanks! Samuel

Re: [PATCH 3/3] utils: implement settrans --pid-file

2013-11-09 Thread Samuel Thibault
Justus Winter, le Thu 07 Nov 2013 19:12:30 +0100, a écrit : > This switch makes settrans write the pid file of the active translator > it starts to a file. This makes the pid easily retrievable for test > suites. Ack. > * utils/settrans.c (options): Add --pid-file. > (main): Add variable pid_file

Re: [PATCH 2/3] utils: implement portinfo --search

2013-11-09 Thread Samuel Thibault
Justus Winter, le Thu 07 Nov 2013 19:12:29 +0100, a écrit : > @@ -111,6 +113,9 @@ parse_task (char *arg) > > static volatile int hold = 0; > > +error_t search_for_port (task_t, mach_port_t, unsigned); > +error_t search_for_ports (task_t, mach_port_type_t, unsigned); > + > int > main (int ar

Re: [PATCH 1/3] libshouldbeinlibc: fix reference counting in port_name_xlator_create

2013-11-09 Thread Samuel Thibault
Justus Winter, le Thu 07 Nov 2013 19:12:28 +0100, a écrit : > Both task ports are deallocated in the destructor, so they must be > referenced in the constructor. Ack. But then we are missing dereference in if (err) case below. > * libshouldbeinlibc/portxlate.c (port_name_xlator_create): Fix >

Re: [PATCH] libports: fix the thread counts in case the thread creation fails

2013-11-09 Thread Samuel Thibault
Justus Winter, le Sat 09 Nov 2013 14:21:09 +0100, a écrit : > Previously the number of total threads and the number of unused > threads was wrong if at one point the creation of a thread failed. Fix > this by decrementing both counters that were previously optimistically > incremented. Adjust the c

Re: [PATCH 06/14] proc: turn {init, add}str, compare_versions into normal functions

2013-11-09 Thread Ludovic Courtès
Richard Braun skribis: > On Sat, Nov 09, 2013 at 11:08:28AM +0100, Justus Winter wrote: >> Quoting Ludovic =?utf-8?Q?Court=C3=A8s?= (2013-11-09 00:31:08) >> > Justus Winter <4win...@informatik.uni-hamburg.de> skribis: >> > >> > > rebuild_uname uses {init,add}str to incrementally build a version

[PATCH] libports: fix the thread counts in case the thread creation fails

2013-11-09 Thread Justus Winter
Previously the number of total threads and the number of unused threads was wrong if at one point the creation of a thread failed. Fix this by decrementing both counters that were previously optimistically incremented. Adjust the comment accordingly. * libports/manage-multithread.c (ports_manage_p

Re: [PATCH 06/14] proc: turn {init, add}str, compare_versions into normal functions

2013-11-09 Thread Justus Winter
Hi :) Quoting Richard Braun (2013-11-09 14:00:35) > On Sat, Nov 09, 2013 at 11:08:28AM +0100, Justus Winter wrote: > > Quoting Ludovic =?utf-8?Q?Court=C3=A8s?= (2013-11-09 00:31:08) > > > Justus Winter <4win...@informatik.uni-hamburg.de> skribis: > > > > > > > rebuild_uname uses {init,add}str to

Re: [PATCH 06/14] proc: turn {init, add}str, compare_versions into normal functions

2013-11-09 Thread Richard Braun
On Sat, Nov 09, 2013 at 11:08:28AM +0100, Justus Winter wrote: > Quoting Ludovic =?utf-8?Q?Court=C3=A8s?= (2013-11-09 00:31:08) > > Justus Winter <4win...@informatik.uni-hamburg.de> skribis: > > > > > rebuild_uname uses {init,add}str to incrementally build a version > > > string, and compare_versi

Re: [PATCH] Normalize whitespace at the end of each file to '\n'

2013-11-09 Thread Samuel Thibault
Justus Winter, le Sat 09 Nov 2013 11:58:04 +0100, a écrit : > Quoting Samuel Thibault (2013-11-08 23:38:33) > > Why not, it does not hurt. Except perhaps these, do we really need to > > put a blank line there? Having then really 0-long avoids allocating any > > data block at all, just metadata. >

Re: [PATCH] Normalize whitespace at the end of each file to '\n'

2013-11-09 Thread Justus Winter
Quoting Samuel Thibault (2013-11-08 23:38:33) > Why not, it does not hurt. Except perhaps these, do we really need to > put a blank line there? Having then really 0-long avoids allocating any > data block at all, just metadata. > > > diff --git a/pfinet/glue-include/asm/segment.h > > b/pfinet/g

Re: [PATCH 06/14] proc: turn {init, add}str, compare_versions into normal functions

2013-11-09 Thread Justus Winter
Quoting Ludovic =?utf-8?Q?Court=C3=A8s?= (2013-11-09 00:31:08) > Justus Winter <4win...@informatik.uni-hamburg.de> skribis: > > > rebuild_uname uses {init,add}str to incrementally build a version > > string, and compare_versions to sort the versions array. Previously > > those functions were defin