Re: [PATCH 6/7] vt: Update spawnpid to be a struct pid_t

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 16 Aug 2006 23:35:57 +0400
Oleg Nesterov <[email protected]> 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 <[email protected]>

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 <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
---

 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 */
_

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux