Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Ralf Baechle <ralf@linux-mips.org>
To: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Cc: linux-mips@linux-mips.org
Subject: Re: [PATCH] fix possible sleeping in atomic on setup/restore sigcontext
Date: Thu, 13 Oct 2005 15:04:15 +0100	[thread overview]
Message-ID: <20051013140415.GC2654@linux-mips.org> (raw)
In-Reply-To: <20051007.235152.75184664.anemo@mba.ocn.ne.jp>

On Fri, Oct 07, 2005 at 11:51:52PM +0900, Atsushi Nemoto wrote:

> The setup_sigcontect/restore_sigcontext might sleep on
> put_user/get_user with preemption disabled (i.e. atomic context).
> Sleeping in atomic context is not allowed.  This patch fixes this
> problem using temporary variable (struct sigcontext tmpsc).
> 
> Another possible fix might be rewriting
> restore_fp_context/save_fp_context to copy to/from current
> thread_struct and use them with restore_fp/save_fp.

I think much of the 87d54649f67d8ffe0a8d8176de8c210a6c4bb4a7 preemption
patch is flawed and the problem you were trying to fix are in part just
caused by it.

Rule of thumb - if there's a preempt_disable anywhere, it's probably
wrong ...

   Ralf

  reply	other threads:[~2005-10-13 14:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-07 14:51 [PATCH] fix possible sleeping in atomic on setup/restore sigcontext Atsushi Nemoto
2005-10-13 14:04 ` Ralf Baechle [this message]
2005-10-14  2:22   ` Atsushi Nemoto
2006-02-07 16:52 ` Atsushi Nemoto

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=20051013140415.GC2654@linux-mips.org \
    --to=ralf@linux-mips.org \
    --cc=anemo@mba.ocn.ne.jp \
    --cc=linux-mips@linux-mips.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