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

From: Eric W. Biederman
Date: Wed Aug 16 2006 - 13:53:43 EST


Andrew Morton <akpm@xxxxxxxx> writes:

> On Wed, 16 Aug 2006 23:35:57 +0400
> Oleg Nesterov <oleg@xxxxxxxxxx> 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)

I need to relook at this. But I believe Oleg found an idiom bug in
f_getown that will also apply here. Basically if the update is not
an atomic transaction then we need to hold a lock when updating the
struct pid pointer so updates and uses of the pointer don't race.

Assuming I need to address that. I will place spawnpid, spawnsig,
and their lock into a structure and see if I can give it a little
bit better name.

My only defense. I didn't change the name in the first place. :)

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