From: David Meybohm <dmeybohmlkml@bellsouth.net>
To: Chris Friesen <cfriesen@nortelnetworks.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: where to put kernel code to run on exec?
Date: Fri, 7 Jan 2005 20:49:17 -0500 [thread overview]
Message-ID: <20050108014917.GA2629@localhost> (raw)
In-Reply-To: <41DEAFE2.1030001@nortelnetworks.com>
On Fri, Jan 07, 2005 at 09:50:58AM -0600, Chris Friesen wrote:
>
> I've added a field to the task struct to keep track of whether or not
> the process wants to be notified of various events. On exec() I'd like
> to clear this field.
>
> I'm having problems finding a nice clean place to put the code to clear
> it. The obvious choice would be in the last bit of the success path in
> do_execve(), but there's nothing similar there already, so I'm probably
> missing something.
>
> Is there some standard place to put code to run on a successful call to
> exec()?
What about in flush_old_exec()? Any place after exec_mmap() looks good.
If the exec fails after that point, the process has to be killed,
because all the old memory space is gone. In that case you don't have
to worry about clearing the field because the process is gone.
Dave
prev parent reply other threads:[~2005-01-08 1:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-07 15:50 where to put kernel code to run on exec? Chris Friesen
2005-01-08 1:49 ` David Meybohm [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050108014917.GA2629@localhost \
--to=dmeybohmlkml@bellsouth.net \
--cc=cfriesen@nortelnetworks.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox