On Wed, 16 Aug 2006 23:35:57 +0400 Oleg Nesterov <oleg at tv-sign.ru> wrote: > On 08/15, Eric W. Biederman wrote: > > > > diff --git a/drivers/char/vt_ioctl.c b/drivers/char/vt_ioctl.c > > index 28eff1a..d7e0187 100644 > > --- a/drivers/char/vt_ioctl.c > > +++ b/drivers/char/vt_ioctl.c > > @@ -645,12 +645,13 @@ #endif > > */ > > case KDSIGACCEPT: > > { > > - extern int spawnpid, spawnsig; > > + struct pid *spawnpid; > ^^^^^^^^^^^^^^^^^^^^ > Should be "extern struct pid *spawnpid" ? > It was updated thusly: (the identifiers are a bit generic-sounding though) From: Eric Biederman <ebiederm at xmission.com> This moves the declaration of spawnpid and spawnsig into, a header file, and makes spawnpid extern. Without being extern the declaration of swanpid was a nice little struct pid leak in the kernel and totally broke the spawnpid functionality :( Signed-off-by: Eric Biederman <ebiederm at xmission.com> Signed-off-by: Andrew Morton <akpm at osdl.org> --- drivers/char/vt_ioctl.c | 2 -- include/linux/vt_kern.h | 3 +++ 2 files changed, 3 insertions(+), 2 deletions(-) diff -puN drivers/char/vt_ioctl.c~vt-update-spawnpid-to-be-a-struct-pid_t-tidy drivers/char/vt_ioctl.c --- a/drivers/char/vt_ioctl.c~vt-update-spawnpid-to-be-a-struct-pid_t-tidy +++ a/drivers/char/vt_ioctl.c @@ -645,8 +645,6 @@ int vt_ioctl(struct tty_struct *tty, str */ case KDSIGACCEPT: { - struct pid *spawnpid; - extern int spawnsig; if (!perm || !capable(CAP_KILL)) return -EPERM; if (!valid_signal(arg) || arg < 1 || arg == SIGKILL) diff -puN include/linux/vt_kern.h~vt-update-spawnpid-to-be-a-struct-pid_t-tidy include/linux/vt_kern.h --- a/include/linux/vt_kern.h~vt-update-spawnpid-to-be-a-struct-pid_t-tidy +++ a/include/linux/vt_kern.h @@ -84,4 +84,7 @@ void reset_vc(struct vc_data *vc); extern char con_buf[CON_BUF_SIZE]; extern struct semaphore con_buf_sem; +extern struct pid *spawnpid; +extern int spawnsig; + #endif /* _VT_KERN_H */ _