From: Oleg Nesterov <oleg@tv-sign.ru>
To: Andrew Morton <akpm@osdl.org>
Cc: Jens Axboe <axboe@suse.de>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] copy_process: cosmetic ->ioprio tweak
Date: Tue, 22 Aug 2006 22:27:07 +0400 [thread overview]
Message-ID: <20060822182707.GA469@oleg> (raw)
In-Reply-To: <20060821143224.62018aba.akpm@osdl.org>
On 08/21, Andrew Morton wrote:
>
> On Sun, 20 Aug 2006 18:53:21 +0400
> Oleg Nesterov <oleg@tv-sign.ru> wrote:
>
> > copy_process:
> > // holds tasklist_lock + ->siglock
> > /*
> > * inherit ioprio
> > */
> > p->ioprio = current->ioprio;
> >
> > Why? ->ioprio was already copied in dup_task_struct().
>
> It might just be a thinko.
>
> > I guess this is needed
> > to ensure that the child can't escape sys_ioprio_set(IOPRIO_WHO_{PGRP,USER}),
> > yes?
>
> How could the child escape that if this assignment was not present?
It is possible that sys_ioprio_set(IOPRIO_WHO_PGRP) was called after
copy_process() already did dup_task_struct(), but before it takes
tasklist_lock. Documentation/block/ioprio.txt doesn't say should
ioprio_set() be "atomic" or not. If not, we can kill this line, and
(more importantly) drop tasklist_lock in fs/ioprio.c
Oleg.
prev parent reply other threads:[~2006-08-22 14:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-20 14:53 [PATCH] copy_process: cosmetic ->ioprio tweak Oleg Nesterov
2006-08-21 21:32 ` Andrew Morton
2006-08-22 18:27 ` Oleg Nesterov [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=20060822182707.GA469@oleg \
--to=oleg@tv-sign.ru \
--cc=akpm@osdl.org \
--cc=axboe@suse.de \
--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