Re: Possible bug in do_execve()
From: Sonny Rao
Date: Thu Jun 22 2006 - 16:02:20 EST
On Thu, Jun 22, 2006 at 06:59:07AM -0500, Serge E. Hallyn wrote:
> Quoting Sonny Rao (sonny@xxxxxxxxxxx):
> > > > It seems to assume that mm->context is valid before doing a check.
> > > >
> > > > Since I don't have a sparc64 box, I can't check to see if this
> > > > actually breaks things or not.
> > >
> > > So we can either go through all arch's and make sure destroy_context is
> > > safe for invalid context, or split mmput() and destroy_context()...
> > >
> > > The former seems easier, but the latter seems more robust in the face of
> > > future code changes I guess.
> >
> > Yes, the former does seem easier, and perhaps easiest is to do that
> > and document what the pre-conditions are so future developers at least
> > have a clue.
>
> Hmm, but document it where, since there is no single destroy_context()
> definition? At the mmput() and __mmdrop() definitions in kernel/fork.c?
>
That seems reasonable to me.
I was hoping some of the arch maintainers might chime in with their
insight on the issue.
-
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/