From: Christoph Hellwig <hch@infradead.org>
To: Kirill Korotaev <dev@sw.ru>
Cc: Andrew Morton <akpm@osdl.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] unserialized task->files changing
Date: Tue, 8 Aug 2006 11:12:08 +0100 [thread overview]
Message-ID: <20060808101208.GA25956@infradead.org> (raw)
In-Reply-To: <44D86275.2080406@sw.ru>
On Tue, Aug 08, 2006 at 02:07:49PM +0400, Kirill Korotaev wrote:
> Fixed race on put_files_struct on exec with proc.
> Restoring files on current on error path may lead
> to proc having a pointer to already kfree-d files_struct.
This is three times the exact same code sequence, it should probably go into
a helper:
void reset_current_files(struct files_struct *files)
{
struct files_struct *old = current->files;
task_lock(current);
current->files = files;
task_unlock(current);
put_files_struct(old);
}
next prev parent reply other threads:[~2006-08-08 10:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-08 10:07 [PATCH] unserialized task->files changing Kirill Korotaev
2006-08-08 10:12 ` Christoph Hellwig [this message]
2006-08-08 10:23 ` Eric Dumazet
2006-08-08 10:43 ` Kirill Korotaev
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=20060808101208.GA25956@infradead.org \
--to=hch@infradead.org \
--cc=akpm@osdl.org \
--cc=dev@sw.ru \
--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