The patch titled lguest-the-host-code-vs-futex-new-private-futexes has been added to the -mm tree. Its filename is lguest-the-host-code-vs-futex-new-private-futexes.patch *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this ------------------------------------------------------ Subject: lguest-the-host-code-vs-futex-new-private-futexes From: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> Cc: Eric Dumazet <dada1@xxxxxxxxxxxxx> Cc: Rusty Russell <rusty@xxxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- drivers/lguest/io.c | 21 ++++++++++++--------- 1 files changed, 12 insertions(+), 9 deletions(-) diff -puN drivers/lguest/io.c~lguest-the-host-code-vs-futex-new-private-futexes drivers/lguest/io.c --- a/drivers/lguest/io.c~lguest-the-host-code-vs-futex-new-private-futexes +++ a/drivers/lguest/io.c @@ -102,13 +102,14 @@ int bind_dma(struct lguest *lg, unsigned int i; int ret = 0; union futex_key key; + struct rw_semaphore *fshared = ¤t->mm->mmap_sem; if (interrupt >= LGUEST_IRQS) return 0; mutex_lock(&lguest_lock); - down_read(¤t->mm->mmap_sem); - if (get_futex_key((u32 __user *)ukey, &key) != 0) { + down_read(fshared); + if (get_futex_key((u32 __user *)ukey, fshared, &key) != 0) { kill_guest(lg, "bad dma key %#lx", ukey); goto unlock; } @@ -134,7 +135,7 @@ int bind_dma(struct lguest *lg, } drop_futex_key_refs(&key); unlock: - up_read(¤t->mm->mmap_sem); + up_read(fshared); mutex_unlock(&lguest_lock); return ret; } @@ -307,11 +308,12 @@ void send_dma(struct lguest *lg, unsigne { union futex_key key; int empty = 0; + struct rw_semaphore *fshared = ¤t->mm->mmap_sem; again: mutex_lock(&lguest_lock); - down_read(¤t->mm->mmap_sem); - if (get_futex_key((u32 __user *)ukey, &key) != 0) { + down_read(fshared); + if (get_futex_key((u32 __user *)ukey, fshared, &key) != 0) { kill_guest(lg, "bad sending DMA key"); goto unlock; } @@ -342,7 +344,7 @@ again: lg->pending_key = ukey; } unlock: - up_read(¤t->mm->mmap_sem); + up_read(fshared); mutex_unlock(&lguest_lock); } @@ -382,10 +384,11 @@ unsigned long get_dma_buffer(struct lgue unsigned long ret = 0; union futex_key key; struct lguest_dma_info *i; + struct rw_semaphore *fshared = ¤t->mm->mmap_sem; mutex_lock(&lguest_lock); - down_read(¤t->mm->mmap_sem); - if (get_futex_key((u32 __user *)ukey, &key) != 0) { + down_read(fshared); + if (get_futex_key((u32 __user *)ukey, fshared, &key) != 0) { kill_guest(lg, "bad registered DMA buffer"); goto unlock; } @@ -405,7 +408,7 @@ unsigned long get_dma_buffer(struct lgue } } unlock: - up_read(¤t->mm->mmap_sem); + up_read(fshared); mutex_unlock(&lguest_lock); return ret; } _ Patches currently in -mm which might be from akpm@xxxxxxxxxxxxxxxxxxxx are origin.patch extend-print_symbol-capability.patch add-kvasprintf.patch zlib-backout.patch slab-introduce-krealloc.patch git-acpi.patch git-alsa.patch git-alsa-fixup.patch git-agpgart.patch git-arm.patch git-avr32.patch revert-gregkh-driver-remove-struct-subsystem-as-it-is-no-longer-needed.patch ida-implement-idr-based-id-allocator-fix.patch more-fix-gregkh-driver-sysfs-kill-unnecessary-attribute-owner.patch even-more-fix-gregkh-driver-sysfs-kill-unnecessary-attribute-owner.patch even-even-more-fix-gregkh-driver-sysfs-kill-unnecessary-attribute-owner.patch git-drm.patch git-dvb.patch git-dvb-vs-gregkh-driver-sysfs-kill-unnecessary-attribute-owner.patch git-gfs2-nmw.patch git-ieee1394.patch sbp2-include-fixes.patch ieee1394-iso-needs-schedh.patch git-input.patch git-jfs.patch git-kvm.patch revert-rm-pointless-dmaengine-exports.patch git-md-accel-fix.patch git-mmc-build-fix.patch ne-add-platform_driver-fix.patch git-e1000.patch git-e1000-fixup-2.patch input-rfkill-add-support-for-input-key-to-control-wireless-radio.patch git-ocfs2.patch git-parisc.patch git-r8169.patch rm9000-serial-driver.patch fix-gregkh-pci-pci-remove-the-broken-pci_multithread_probe-option.patch git-pciseg.patch git-s390-vs-gregkh-driver-sysfs-kill-unnecessary-attribute-owner.patch s390-net-lcs-convert-to-the-kthread-api.patch git-sh-fixup.patch git-scsi-misc.patch scsi-fix-config_scsi_wait_scan=m.patch git-block-fixup.patch git-unionfs.patch i386-map-enough-initial-memory-to-create-lowmem-mappings-fix.patch i386-__inquire_remote_apic-printk-warning-fix.patch xfs-clean-up-shrinker-games.patch add-apply_to_page_range-which-applies-a-function-to-a-pte-range-fix.patch add-__gfp_movable-for-callers-to-flag-allocations-from-high-memory-that-may-be-migrated.patch bias-the-location-of-pages-freed-for-min_free_kbytes-in-the-same-max_order_nr_pages-blocks.patch mm-merge-populate-and-nopage-into-fault-fixes-nonlinear.patch mm-merge-nopfn-into-fault.patch smaps-add-clear_refs-file-to-clear-reference.patch maps2-move-the-page-walker-code-to-lib.patch maps2-add-proc-pid-pagemap-interface.patch mm-move-common-segment-checks-to-separate-helper-function-v7.patch slab-mark-set_up_list3s-__init.patch slub-core.patch mm-optimize-kill_bdev.patch lazy-freeing-of-memory-through-madv_free.patch lazy-freeing-of-memory-through-madv_free-vs-mm-madvise-avoid-exclusive-mmap_sem.patch srmcons-fix-kmallocgfp_kernel-inside-spinlock.patch uml-driver-formatting-fixes-fix.patch cache-pipe-buf-page-address-for-non-highmem-arch.patch reduce-size-of-task_struct-on-64-bit-machines.patch mm-shrink-parent-dentries-when-shrinking-slab.patch merge-sys_clone-sys_unshare-nsproxy-and-namespace.patch virtual_eisa_root_init-should-be-__init.patch proc-maps-protection.patch fix-cycladesh-for-x86_64-and-probably-others.patch rtc-add-rtc-rs5c313-driver.patch enlarge-console-name.patch move-die-notifier-handling-to-common-code.patch fix-sscanf-%n-match-at-end-of-input-string.patch parport-dev-driver-model-support.patch add-support-for-deferrable-timers-respun.patch linux-sysdevh-needs-to-include-linux-moduleh.patch time-smp-friendly-alignment-of-struct-clocksource.patch move-timekeeping-code-to-timekeepingc.patch fix-kevents-childs-priority-greediness.patch display-all-possible-partitions-when-the-root-filesystem-failed-to-mount.patch enhance-initcall_debug-measure-latency.patch dtlk-fix-error-checks-in-module_init.patch document-spin_lock_unlocked-rw_lock_unlocked-deprecation.patch upper-32-bits.patch driver-for-the-maxim-ds1wm-a-1-wire-bus-master-asic-core.patch define-and-use-new-eventscpu_lock_acquire-and-cpu_lock_release.patch call-cpu_chain-with-cpu_down_failed-if-cpu_down_prepare-failed-vs-reduce-size-of-task_struct-on-64-bit-machines.patch kthread-dont-depend-on-work-queues-take-2.patch fix-kthread_create-vs-freezer-theoretical-race.patch speedup-divides-by-cpu_power-in-scheduler.patch utimensat-implementation.patch revert-rtc-add-rtc_merge_alarm.patch declare-struct-ktime.patch make-futex_wait-use-an-hrtimer-for-timeout.patch kprobes-the-on-off-knob-thru-debugfs-updated.patch atomich-add-atomic64-cmpxchg-xchg-and-add_unless-to-powerpc.patch local_t-powerpc-extension.patch linux-kernel-markers-i386-optimization.patch signal-timer-event-fds-v9-signalfd-core.patch signal-timer-event-fds-v9-timerfd-core.patch signal-timer-event-fds-v9-eventfd-core.patch revoke-core-code-fix-shared-mapping-revoke.patch revoke-wire-up-i386-system-calls.patch x86-serial-convert-legacy-com-ports-to-platform-devices.patch lguest-vs-x86_64-mm-use-per-cpu-variables-for-gdt-pda.patch lguest-the-host-code-vs-x86_64-mm-i386-separate-hardware-defined-tss-from-linux-additions.patch lguest-the-host-code-vs-futex-new-private-futexes.patch fs-convert-core-functions-to-zero_user_page-pass-kmap-type.patch fs-convert-core-functions-to-zero_user_page-fix-2.patch ntfs-use-zero_user_page-fix.patch reiser4-slab-allocators-remove-slab_debug_initial-flag.patch fbdev-hecuba-framebuffer-driver.patch vt-add-color-support-to-the-underline-and-italic-attributes-fix.patch sm501fb-printk-warning-fixes.patch integrity-new-hooks-fix.patch integrity-evm-as-an-integrity-service-provider-tidy.patch integrity-evm-as-an-integrity-service-provider-tidy-fix.patch integrity-evm-as-an-integrity-service-provider-tidy-fix-2.patch integrity-ima-integrity_measure-support-tidy.patch integrity-ima-integrity_measure-support-fix.patch integrity-ima-integrity_measure-support-fix-2.patch integrity-tpm-internal-kernel-interface-tidy.patch git-gccbug-fixup.patch w1-build-fix.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