public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: BAIN <bainonline@gmail.com>
To: linux-kernel@vger.kernel.org
Subject: Re: set_fs() preemption safety? [was sys_fs() safety oops !]
Date: Sun, 4 Jul 2004 11:14:27 -0400	[thread overview]
Message-ID: <2ff2162804070408142348de6b@mail.gmail.com> (raw)
In-Reply-To: <200407041653.55816.arnd@arndb.de>

> > is the following block safe to be used in preemptible kernels?
> >
> > old_fs = get_fs();
> > set_fs(KERNEL_DS);
> >
> > do_your_things here; (usually call sys calls stuff from kernel space)
> >
> > set_fs(old_fs);
> 
> On most architectures, this should not be a problem, because set_fs()
> only modifies the state of the current task, not any actual processor
> registers as the name suggests.
> 
> However, on s390 the state is actually kept in cpu control register cr7
> and not in the task_struct. Martin, can you comment on how this is
> maintained over a schedule() or if this is a real bug?
Ok this is new info for me,...

I was under impression that i am banned from calling schedule between
the two calls to set_fs.

This answers my question. Thanks,

BAIN

      reply	other threads:[~2004-07-04 15:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-04 14:36 set_fs() preemption safety? [was sys_fs() safety oops !] BAIN
2004-07-04 14:53 ` Arnd Bergmann
2004-07-04 15:14   ` BAIN [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=2ff2162804070408142348de6b@mail.gmail.com \
    --to=bainonline@gmail.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