linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] coccicheck: Fix missing 0 index in kill loop
@ 2016-05-16 12:55 Kees Cook
  2016-05-17 14:32 ` Nicolas Palix (LIG)
  0 siblings, 1 reply; 4+ messages in thread
From: Kees Cook @ 2016-05-16 12:55 UTC (permalink / raw)
  To: Julia Lawall
  Cc: linux-kernel, Gilles Muller, Nicolas Palix, Michal Marek, cocci

By default, "seq" counts from 1, but processes were starting counting
from 0, so when interrupted, coccicheck would leave the 0th process
running.

Signed-off-by: Kees Cook <keescook@chromium.org>
---
 scripts/coccicheck | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/coccicheck b/scripts/coccicheck
index b2d758188f2f..dd85a455b2ba 100755
--- a/scripts/coccicheck
+++ b/scripts/coccicheck
@@ -98,7 +98,7 @@ run_cmd() {
 }
 
 kill_running() {
-	for i in $(seq $(( NPROC - 1 )) ); do
+	for i in $(seq 0 $(( NPROC - 1 )) ); do
 		if [ $VERBOSE -eq 2 ] ; then
 			echo "Killing ${SPATCH_PID[$i]}"
 		fi
-- 
2.6.3


-- 
Kees Cook
Chrome OS & Brillo Security

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] coccicheck: Fix missing 0 index in kill loop
  2016-05-16 12:55 [PATCH] coccicheck: Fix missing 0 index in kill loop Kees Cook
@ 2016-05-17 14:32 ` Nicolas Palix (LIG)
  2016-05-17 14:33   ` Julia Lawall
  0 siblings, 1 reply; 4+ messages in thread
From: Nicolas Palix (LIG) @ 2016-05-17 14:32 UTC (permalink / raw)
  To: Kees Cook, Julia Lawall; +Cc: linux-kernel, Gilles Muller, Michal Marek, cocci

[-- Attachment #1: Type: text/plain, Size: 855 bytes --]

Le 16/05/16 14:55, Kees Cook a écrit :
> By default, "seq" counts from 1, but processes were starting counting
> from 0, so when interrupted, coccicheck would leave the 0th process
> running.
> 
> Signed-off-by: Kees Cook <keescook@chromium.org>

Acked-by: Nicolas Palix <nicolas.palix@imag.fr>


> ---
>  scripts/coccicheck | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/scripts/coccicheck b/scripts/coccicheck
> index b2d758188f2f..dd85a455b2ba 100755
> --- a/scripts/coccicheck
> +++ b/scripts/coccicheck
> @@ -98,7 +98,7 @@ run_cmd() {
>  }
>  
>  kill_running() {
> -	for i in $(seq $(( NPROC - 1 )) ); do
> +	for i in $(seq 0 $(( NPROC - 1 )) ); do
>  		if [ $VERBOSE -eq 2 ] ; then
>  			echo "Killing ${SPATCH_PID[$i]}"
>  		fi
> 


-- 
Nicolas Palix
http://lig-membres.imag.fr/palix/


[-- Attachment #2: Signature cryptographique S/MIME --]
[-- Type: application/pkcs7-signature, Size: 2959 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] coccicheck: Fix missing 0 index in kill loop
  2016-05-17 14:32 ` Nicolas Palix (LIG)
@ 2016-05-17 14:33   ` Julia Lawall
  2016-05-19  7:57     ` Michal Marek
  0 siblings, 1 reply; 4+ messages in thread
From: Julia Lawall @ 2016-05-17 14:33 UTC (permalink / raw)
  To: Nicolas Palix (LIG)
  Cc: Kees Cook, Julia Lawall, linux-kernel, Gilles Muller,
	Michal Marek, cocci

[-- Attachment #1: Type: TEXT/PLAIN, Size: 977 bytes --]



On Tue, 17 May 2016, Nicolas Palix (LIG) wrote:

> Le 16/05/16 14:55, Kees Cook a écrit :
> > By default, "seq" counts from 1, but processes were starting counting
> > from 0, so when interrupted, coccicheck would leave the 0th process
> > running.
> >
> > Signed-off-by: Kees Cook <keescook@chromium.org>
>
> Acked-by: Nicolas Palix <nicolas.palix@imag.fr>

Acked-by: Julia Lawall <julia.lawall@lip6.fr>

>
>
> > ---
> >  scripts/coccicheck | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/scripts/coccicheck b/scripts/coccicheck
> > index b2d758188f2f..dd85a455b2ba 100755
> > --- a/scripts/coccicheck
> > +++ b/scripts/coccicheck
> > @@ -98,7 +98,7 @@ run_cmd() {
> >  }
> >
> >  kill_running() {
> > -	for i in $(seq $(( NPROC - 1 )) ); do
> > +	for i in $(seq 0 $(( NPROC - 1 )) ); do
> >  		if [ $VERBOSE -eq 2 ] ; then
> >  			echo "Killing ${SPATCH_PID[$i]}"
> >  		fi
> >
>
>
> --
> Nicolas Palix
> http://lig-membres.imag.fr/palix/
>
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] coccicheck: Fix missing 0 index in kill loop
  2016-05-17 14:33   ` Julia Lawall
@ 2016-05-19  7:57     ` Michal Marek
  0 siblings, 0 replies; 4+ messages in thread
From: Michal Marek @ 2016-05-19  7:57 UTC (permalink / raw)
  To: Julia Lawall, Nicolas Palix (LIG)
  Cc: Kees Cook, linux-kernel, Gilles Muller, cocci

Dne 17.5.2016 v 16:33 Julia Lawall napsal(a):
> 
> 
> On Tue, 17 May 2016, Nicolas Palix (LIG) wrote:
> 
>> Le 16/05/16 14:55, Kees Cook a écrit :
>>> By default, "seq" counts from 1, but processes were starting counting
>>> from 0, so when interrupted, coccicheck would leave the 0th process
>>> running.
>>>
>>> Signed-off-by: Kees Cook <keescook@chromium.org>
>>
>> Acked-by: Nicolas Palix <nicolas.palix@imag.fr>
> 
> Acked-by: Julia Lawall <julia.lawall@lip6.fr>

Applied to kbuild.git#misc.

Michal

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-05-19  7:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-16 12:55 [PATCH] coccicheck: Fix missing 0 index in kill loop Kees Cook
2016-05-17 14:32 ` Nicolas Palix (LIG)
2016-05-17 14:33   ` Julia Lawall
2016-05-19  7:57     ` Michal Marek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).