lkml.org 
[lkml]   [2008]   [Jun]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Top kernel oopses/warnings for the week of May 30th 2008
On Tue, 3 Jun 2008 00:44:38 +0100 (BST)
Hugh Dickins <hugh@veritas.com> wrote:

> + if (in_atomic())
> + kunmap_atomic(kaddr, KM_USER0);
> + else
> + kunmap(kmapped_page);

eek.

/*
* Are we running in atomic context? WARNING: this macro cannot
* always detect atomic context; in particular, it cannot know about
* held spinlocks in non-preemptible kernels. Thus it should not be
* used in the general case to determine whether sleeping is possible.
* Do not use in_atomic() in driver code.
*/
#define in_atomic() ((preempt_count() & ~PREEMPT_ACTIVE) != PREEMPT_INATOMIC_BASE)



\
 
 \ /
  Last update: 2008-06-03 02:03    [W:0.065 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site