Linux can have pids up to 4*1024*1024.  To handle such huge numbers
pid_buf needs to be larger.

Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
Richard Weinberger 2011-07-25 17:12:55 -07:00 коммит произвёл Linus Torvalds
Родитель f1c2bb8b99
Коммит 39073db15b
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -32,7 +32,7 @@ int start_watchdog(int *in_fd_ret, int *out_fd_ret, char *sock)
{ {
struct dog_data data; struct dog_data data;
int in_fds[2], out_fds[2], pid, n, err; int in_fds[2], out_fds[2], pid, n, err;
char pid_buf[sizeof("nnnnn\0")], c; char pid_buf[sizeof("nnnnnnn\0")], c;
char *pid_args[] = { "/usr/bin/uml_watchdog", "-pid", pid_buf, NULL }; char *pid_args[] = { "/usr/bin/uml_watchdog", "-pid", pid_buf, NULL };
char *mconsole_args[] = { "/usr/bin/uml_watchdog", "-mconsole", NULL, char *mconsole_args[] = { "/usr/bin/uml_watchdog", "-mconsole", NULL,
NULL }; NULL };