All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rob Love <rml@ximian.com>
To: Joe Korty <joe.korty@ccur.com>
Cc: William Lee Irwin III <wli@holomorphy.com>,
	Albert Cahalan <albert@users.sourceforge.net>,
	linux-kernel mailing list <linux-kernel@vger.kernel.org>
Subject: Re: atomic copy_from_user?
Date: Mon, 22 Dec 2003 15:55:06 -0500	[thread overview]
Message-ID: <1072126506.3318.31.camel@fur> (raw)
In-Reply-To: <20031222182637.GA2659@rudolph.ccur.com>

On Mon, 2003-12-22 at 13:26, Joe Korty wrote:

> Shouldn't the dec_prempt_count() in kunmap_atomic() be followed
> by a preempt_check_resched()???

Probably.

Actually, dec_preempt_count() ought to call preempt_check_resched()
itself.  In the case of !CONFIG_PREEMPT, that call would simply optimize
away.

Attached patch is against 2.6.0.

	Rob Love


 linux/preempt.h |    1 +
 1 files changed, 1 insertion(+)

diff -urN include/linux/preempt.h.orig include/linux/preempt.h
--- include/linux/preempt.h.orig	2003-12-22 15:53:11.329113296 -0500
+++ include/linux/preempt.h	2003-12-22 15:53:51.314034664 -0500
@@ -18,6 +18,7 @@
 #define dec_preempt_count() \
 do { \
 	preempt_count()--; \
+	preempt_check_resched(); \
 } while (0)
 
 #ifdef CONFIG_PREEMPT



  reply	other threads:[~2003-12-22 20:55 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-22  0:48 atomic copy_from_user? Albert Cahalan
2003-12-22  4:31 ` Linus Torvalds
2003-12-22  9:36   ` Andrew Morton
2003-12-22 15:00 ` William Lee Irwin III
2003-12-22 18:26   ` Joe Korty
2003-12-22 20:55     ` Rob Love [this message]
2003-12-22 21:22       ` Joe Korty
2003-12-22 21:40         ` Rob Love
2003-12-22 21:59           ` Joe Korty
2003-12-22 22:14             ` Rob Love
2003-12-22 22:24             ` Andrew Morton
2003-12-22 22:06       ` Joe Korty
2003-12-22 22:18         ` Rob Love
2003-12-22 22:14       ` Andrew Morton
2003-12-22 22:19         ` Rob Love
2003-12-22 22:35           ` Joe Korty
2003-12-22 22:59             ` Rob Love

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=1072126506.3318.31.camel@fur \
    --to=rml@ximian.com \
    --cc=albert@users.sourceforge.net \
    --cc=joe.korty@ccur.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=wli@holomorphy.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.