mirror of https://lore.kernel.org/lkml/
 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	[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

Powered by JetHome