login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2008
»
January
»
14
Re: [patch] rewrite rd
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
[view in full thread]
From: Jens Axboe
Subject:
Re: [patch] rewrite rd
Date: Monday, January 14, 2008 - 10:21 am
On Mon, Jan 14 2008, Matthew Wilcox wrote:
quoted text
> On Tue, Dec 04, 2007 at 05:26:28AM +0100, Nick Piggin wrote: > > +static void copy_to_brd(struct brd_device *brd, const void *src, > > + sector_t sector, size_t n) > > +{ > > + struct page *page; > > + void *dst; > > + unsigned int offset = (sector & (PAGE_SECTORS-1)) << SECTOR_SHIFT; > > + size_t copy; > > + > > + copy = min((unsigned long)n, PAGE_SIZE - offset); > > + page = brd_lookup_page(brd, sector); > > + BUG_ON(!page); > > + > > + dst = kmap_atomic(page, KM_USER1); > > + memcpy(dst + offset, src, copy); > > + kunmap_atomic(dst, KM_USER1); > > You're using kmap_atomic, but I see no reason you can't be preempted. > Don't you need to at least disable preemption while you have stuff > atomically kmapped?
kmap_atomic() disables preemption through pagefault_disable(). -- Jens Axboe --
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
Messages in current thread:
[patch] rewrite rd
, Nick Piggin
, (Mon Dec 3, 9:26 pm)
Re: [patch] rewrite rd
, Andrew Morton
, (Mon Dec 3, 11:29 pm)
Re: [patch] rewrite rd
, Nick Piggin
, (Tue Dec 4, 12:01 am)
Re: [patch] rewrite rd
, Nick Piggin
, (Tue Dec 4, 12:08 am)
Re: [patch] rewrite rd
, Rob Landley
, (Tue Dec 4, 12:55 am)
Re: [patch] rewrite rd
, Nick Piggin
, (Tue Dec 4, 2:29 am)
Re: [patch] rewrite rd
, Christian Borntraeger
, (Tue Dec 4, 2:54 am)
Re: [patch] rewrite rd
, Nick Piggin
, (Tue Dec 4, 3:10 am)
[patch] rd: support XIP
, Nick Piggin
, (Tue Dec 4, 4:21 am)
[patch] ext2: xip check fix
, Nick Piggin
, (Tue Dec 4, 4:23 am)
Re: [patch] rd: support XIP
, Andrew Morton
, (Tue Dec 4, 4:26 am)
Re: [patch] rd: support XIP
, Nick Piggin
, (Tue Dec 4, 4:35 am)
Re: [patch] rd: support XIP
, Duane Griffin
, (Tue Dec 4, 5:06 am)
[patch] mm: fix XIP file writes
, Nick Piggin
, (Tue Dec 4, 6:00 am)
[patch] rd: support XIP (updated)
, Nick Piggin
, (Tue Dec 4, 6:03 am)
Re: [patch] rewrite rd
, Rob Landley
, (Tue Dec 4, 12:53 pm)
Re: [patch] ext2: xip check fix
, Carsten Otte
, (Wed Dec 5, 8:43 am)
Re: [patch] ext2: xip check fix
, Nick Piggin
, (Wed Dec 5, 4:33 pm)
Re: [patch] ext2: xip check fix
, Carsten Otte
, (Thu Dec 6, 1:43 am)
Re: [patch] ext2: xip check fix
, Nick Piggin
, (Thu Dec 6, 1:52 am)
Re: [patch] ext2: xip check fix
, Carsten Otte
, (Thu Dec 6, 2:59 am)
Re: [patch] ext2: xip check fix
, Nick Piggin
, (Thu Dec 6, 3:18 am)
Re: [patch] ext2: xip check fix
, Carsten Otte
, (Thu Dec 6, 3:24 am)
Re: [patch] ext2: xip check fix
, Rob Landley
, (Thu Dec 6, 11:11 am)
Re: [patch] ext2: xip check fix
, Jared Hulbert
, (Thu Dec 6, 8:22 pm)
Re: [patch] ext2: xip check fix
, Rob Landley
, (Thu Dec 6, 9:17 pm)
Re: [patch] ext2: xip check fix
, Nick Piggin
, (Thu Dec 6, 9:23 pm)
Re: [patch] ext2: xip check fix
, Jared Hulbert
, (Thu Dec 6, 9:40 pm)
Re: [patch] ext2: xip check fix
, Carsten Otte
, (Fri Dec 7, 1:59 am)
Re: [patch] ext2: xip check fix
, Jared Hulbert
, (Fri Dec 7, 2:52 am)
Re: [patch] mm: fix XIP file writes
, Christian Borntraeger
, (Mon Dec 10, 7:38 am)
Re: [patch] mm: fix XIP file writes
, Nick Piggin
, (Tue Dec 11, 9:03 pm)
Re: [patch] rewrite rd
, Matthew Wilcox
, (Mon Jan 14, 9:47 am)
Re: [patch] rewrite rd
, Jens Axboe
, (Mon Jan 14, 10:21 am)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Trenton D. Adams
Re: Flash IO slow 1.5 MB/s
Alan Cox
Re: Please add ZFS support (from GPL sources)
S K
Re: cpufreq doesn't seem to work in Intel Q9300
Bart Van Assche
Re: Is gcc thread-unsafe?
Mingming Cao
Re: [PATCH 4/5] ext4: fallocate support in ext4
git
:
Junio C Hamano
Re: git-svnimport
Johannes Schindelin
Re: [PATCH] Fix approxidate("never") to always return 0
A Large Angry SCM
Re: [RFC] origin link for cherry-pick and revert
Mark Burton
Re: Sporadic BSOD with msys git?
Junio C Hamano
Re: [PATCH] Detached HEAD (experimental)
git-commits-head
:
Linux Kernel Mailing List
ath9k_htc: Allocate URBs properly
Linux Kernel Mailing List
sm501: add power control callback
Linux Kernel Mailing List
net: don't grab a mutex within a timer context in gianfar
Linux Kernel Mailing List
powerpc/kexec: Add support for FSL-BookE
Linux Kernel Mailing List
V4L/DVB (8976): af9015: Add USB ID for AVerMedia A309
linux-netdev
:
Daniel Lezcano
getsockopt(TCP_DEFER_ACCEPT) value change
David Miller
Re: 2.6.27.18: bnx2/tg3: BUG: "scheduling while atomic" trying to ifenslave a seco...
David Miller
Re: [RFC 0/5] generic rx recycling
Ingo Molnar
Re: [regression] nf_iterate(), BUG: unable to handle kernel NULL pointer dereference
Jeff Kirsher
[net-2.6 PATCH 2/5] e1000e: increase swflag acquisition timeout for ICHx/PCH
openbsd-misc
:
daniele.pilenga
snmpd hangs on 4.1 looking up hrSWRunTable
Christophe Rioux
Implementation example of snmp
Nick Holland
Re: booting openbsd on eee without cd-rom
Cabillot Julien
Re: OpenBSD isakmpd and pf vs Cisco PIX or ASA
Nice Daemon
Re: Bind ntpd on certain interface?
Colocation donated by:
Syndicate