The patch titled mm: k{,um}map_atomic() vs in_atomic() has been added to the -mm tree. Its filename is mm-kummap_atomic-vs-in_atomic.patch See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this ------------------------------------------------------ Subject: mm: k{,um}map_atomic() vs in_atomic() From: Peter Zijlstra <a.p.zijlstra@xxxxxxxxx> Make kmap_atomic/kunmap_atomic denote a pagefault disabled scope. All non trivial implementations already do this anyway. Signed-off-by: Peter Zijlstra <a.p.zijlstra@xxxxxxxxx> Acked-by: Nick Piggin <npiggin@xxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- include/asm-mips/highmem.h | 10 ++++++++-- include/linux/highmem.h | 8 +++++--- 2 files changed, 13 insertions(+), 5 deletions(-) diff -puN include/asm-mips/highmem.h~mm-kummap_atomic-vs-in_atomic include/asm-mips/highmem.h --- a/include/asm-mips/highmem.h~mm-kummap_atomic-vs-in_atomic +++ a/include/asm-mips/highmem.h @@ -21,6 +21,7 @@ #include <linux/init.h> #include <linux/interrupt.h> +#include <linux/uaccess.h> #include <asm/kmap_types.h> /* undef for production */ @@ -70,11 +71,16 @@ static inline void *kmap(struct page *pa static inline void *kmap_atomic(struct page *page, enum km_type type) { + pagefault_disable(); return page_address(page); } -static inline void kunmap_atomic(void *kvaddr, enum km_type type) { } -#define kmap_atomic_pfn(pfn, idx) page_address(pfn_to_page(pfn)) +static inline void kunmap_atomic(void *kvaddr, enum km_type type) +{ + pagefault_enable(); +} + +#define kmap_atomic_pfn(pfn, idx) kmap_atomic(pfn_to_page(pfn), (idx)) #define kmap_atomic_to_page(ptr) virt_to_page(ptr) diff -puN include/linux/highmem.h~mm-kummap_atomic-vs-in_atomic include/linux/highmem.h --- a/include/linux/highmem.h~mm-kummap_atomic-vs-in_atomic +++ a/include/linux/highmem.h @@ -3,6 +3,7 @@ #include <linux/fs.h> #include <linux/mm.h> +#include <linux/uaccess.h> #include <asm/cacheflush.h> @@ -41,9 +42,10 @@ static inline void *kmap(struct page *pa #define kunmap(page) do { (void) (page); } while (0) -#define kmap_atomic(page, idx) page_address(page) -#define kunmap_atomic(addr, idx) do { } while (0) -#define kmap_atomic_pfn(pfn, idx) page_address(pfn_to_page(pfn)) +#define kmap_atomic(page, idx) \ + ({ pagefault_disable(); page_address(page); }) +#define kunmap_atomic(addr, idx) do { pagefault_enable(); } while (0) +#define kmap_atomic_pfn(pfn, idx) kmap_atomic(pfn_to_page(pfn), (idx)) #define kmap_atomic_to_page(ptr) virt_to_page(ptr) #endif _ Patches currently in -mm which might be from a.p.zijlstra@xxxxxxxxx are nfs4-fix-for-recursive-locking-problem.patch bonding-lockdep-annotation.patch lockdep-annotate-sk_lock-nesting-in-af_bluetooth-v2.patch grab-swap-token-reordered.patch new-scheme-to-preempt-swap-token.patch new-scheme-to-preempt-swap-token-tidy.patch mm-arch-do_page_fault-vs-in_atomic.patch mm-pagefault_disableenable.patch mm-kummap_atomic-vs-in_atomic.patch lockdep-annotate-nfs-nfsd-in-kernel-sockets.patch lockdep-annotate-nfs-nfsd-in-kernel-sockets-tidy.patch lockdep-fix-ide-proc-interaction.patch lockdep-spin_lock_irqsave_nested.patch lockdep-spin_lock_irqsave_nested-fix.patch lockdep-spin_lock_irqsave_nested-fix-2.patch lockdep-annotate-bcsp-driver.patch tty-signal-tty-locking.patch tty-signal-tty-locking-3270-fix.patch do_task_stat-dont-take-tty_mutex.patch do_acct_process-dont-take-tty_mutex.patch sys_unshare-remove-a-broken-clone_sighand-code.patch remove-the-old-bd_mutex-lockdep-annotation.patch new-bd_mutex-lockdep-annotation.patch remove-lock_key-approach-to-managing-nested-bd_mutex-locks.patch simplify-some-aspects-of-bd_mutex-nesting.patch use-mutex_lock_nested-for-bd_mutex-to-avoid-lockdep-warning.patch avoid-lockdep-warning-in-md.patch lockdep-annotate-nfsd4-recover-code.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html