Skip to content
Snippets Groups Projects
  1. Feb 02, 2009
  2. Feb 01, 2009
    • Linus Torvalds's avatar
      Manually revert "mlock: downgrade mmap sem while populating mlocked regions" · 27421e21
      Linus Torvalds authored
      
      This essentially reverts commit 8edb08ca.
      
      It downgraded our mmap semaphore to a read-lock while mlocking pages, in
      order to allow other threads (and external accesses like "ps" et al) to
      walk the vma lists and take page faults etc.  Which is a nice idea, but
      the implementation does not work.
      
      Because we cannot upgrade the lock back to a write lock without
      releasing the mmap semaphore, the code had to release the lock entirely
      and then re-take it as a writelock.  However, that meant that the caller
      possibly lost the vma chain that it was following, since now another
      thread could come in and mmap/munmap the range.
      
      The code tried to work around that by just looking up the vma again and
      erroring out if that happened, but quite frankly, that was just a buggy
      hack that doesn't actually protect against anything (the other thread
      could just have replaced the vma with another one instead of totally
      unmapping it).
      
      The only way to downgrade to a read map _reliably_ is to do it at the
      end, which is likely the right thing to do: do all the 'vma' operations
      with the write-lock held, then downgrade to a read after completing them
      all, and then do the "populate the newly mlocked regions" while holding
      just the read lock.  And then just drop the read-lock and return to user
      space.
      
      The (perhaps somewhat simpler) alternative is to just make all the
      callers of mlock_vma_pages_range() know that the mmap lock got dropped,
      and just re-grab the mmap semaphore if it needs to mlock more than one
      vma region.
      
      So we can do this "downgrade mmap sem while populating mlocked regions"
      thing right, but the way it was done here was absolutely not correct.
      Thus the revert, in the expectation that we will do it all correctly
      some day.
      
      Cc: Lee Schermerhorn <lee.schermerhorn@hp.com>
      Cc: Rik van Riel <riel@redhat.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: stable@kernel.org
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      27421e21
    • Linus Torvalds's avatar
      Merge branch 'header-fixes-for-linus' of... · 45c82b5a
      Linus Torvalds authored
      Merge branch 'header-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
      
      * 'header-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (90 commits)
        headers_check fix: x86, swab.h
        headers_check fix: x86, sigcontext32.h
        headers_check fix: x86, sigcontext.h
        headers_check fix: x86, ptrace-abi.h
        headers_check fix: x86, mtrr.h
        headers_check fix: x86, mce.h
        headers_check fix: x86, kvm.h
        headers_check fix: x86, e820.h
        headers_check fix: linux/rtnetlink.h
        headers_check fix: linux/nubus.h
        headers_check fix: video/uvesafb.h
        headers_check fix: video/sisfb.h
        headers_check fix: sound/hdsp.h
        headers_check fix: mtd/inftl-user.h
        headers_check fix: linux/virtio_net.h
        headers_check fix: linux/virtio_console.h
        headers_check fix: linux/virtio_blk.h
        headers_check fix: linux/videodev.h
        headers_check fix: linux/video_encoder.h
        headers_check fix: linux/video_decoder.h
        ...
      45c82b5a
    • Linus Torvalds's avatar
      Merge branch 'core-fixes-for-linus' of... · 1347e965
      Linus Torvalds authored
      Merge branch 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
      
      * 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
        generic-ipi: use per cpu data for single cpu ipi calls
        cpumask: convert lib/smp_processor_id to new cpumask ops
        signals, debug: fix BUG: using smp_processor_id() in preemptible code in print_fatal_signal()
      1347e965
    • Linus Torvalds's avatar
      Merge branch 'irq-fixes-for-linus' of... · ac56b94f
      Linus Torvalds authored
      Merge branch 'irq-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
      
      * 'irq-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
        irq: export __set_irq_handler() and handle_level_irq()
      ac56b94f
    • Linus Torvalds's avatar
      Merge branch 'timers-fixes-for-linus' of... · 5b2d3e6d
      Linus Torvalds authored
      Merge branch 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
      
      * 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
        hrtimer: prevent negative expiry value after clock_was_set()
        hrtimers: allow the hot-unplugging of all cpus
        hrtimers: increase clock min delta threshold while interrupt hanging
      5b2d3e6d
    • Linus Torvalds's avatar
      Merge branch 'tracing-fixes-for-linus' of... · f6490438
      Linus Torvalds authored
      Merge branch 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
      
      * 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
        x86, ds, bts: cleanup/fix DS configuration
        ring-buffer: reset timestamps when ring buffer is reset
        trace: set max latency variable to zero on default
        trace: stop all recording to ring buffer on ftrace_dump
        trace: print ftrace_dump at KERN_EMERG log level
        ring_buffer: reset write when reserve buffer fail
        tracing/function-graph-tracer: fix a regression while suspend to disk
        ring-buffer: fix alignment problem
      f6490438
    • Linus Torvalds's avatar
      Merge branch 'x86-fixes-for-linus' of... · e81cfd21
      Linus Torvalds authored
      Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
      
      * 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
        x86 setup: fix asm constraints in vesa_store_edid
        xen: make sysfs files behave as their names suggest
        x86: tone down mtrr_trim_uncached_memory() warning
        x86: correct the CPUID pattern for MSR_IA32_MISC_ENABLE availability
      e81cfd21
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/voltage-2.6 · 4b8d8ab5
      Linus Torvalds authored
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/voltage-2.6:
        leds: Fix bounds checking of wm8350->pmic.led
        regulator: move bq24022 init back to module_init instead of subsys_initcall
      4b8d8ab5
    • Linus Torvalds's avatar
      Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus · c5e18af9
      Linus Torvalds authored
      * 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus: (27 commits)
        MIPS: Alchemy: time.c build fix
        MIPS: RB532: Export rb532_gpio_set_func()
        MIPS: RB532: Update headers
        MIPS: RB532: Simplify dev3 init
        MIPS: RB532: Remove {get,set}_434_reg()
        MIPS: RB532: Move dev3 init code to devices.c
        MIPS: RB532: Fix set_latch_u5()
        MIPS: RB532: Fix init of rb532_dev3_ctl_res
        MIPS: RB532: Use driver_data instead of platform_data
        MIPS: RB532: Detect uart type, add platform device
        MIPS: RB532: remove useless CF GPIO initialisation
        MIPS: RB532: Auto disable GPIO alternate function
        MIPS: RB532: Add set_type() function to IRQ struct.
        MIPS: RC32434: Define io_map_base for PCI controller
        MIPS: RB532: Fix bit swapping in rb532_set_bit()
        MIPS: Use hardware watchpoints on all R1 and R2 CPUs.
        MIPS: Read watch registers with interrupts disabled.
        MIPS: Fix a typo in watchpoint register structure.
        MIPS: TXx9: Add support for TX4939 internal RTC
        MIPS: R2: Fix broken installation of cache error handler.
        ...
      c5e18af9
    • Mikulas Patocka's avatar
      Fix memory corruption in console selection · 878b8619
      Mikulas Patocka authored
      
      Fix an off-by-two memory error in console selection.
      
      The loop below goes from sel_start to sel_end (inclusive), so it writes
      one more character.  This one more character was added to the allocated
      size (+1), but it was not multiplied by an UTF-8 multiplier.
      
      This patch fixes a memory corruption when UTF-8 console is used and the
      user selects a few characters, all of them 3-byte in UTF-8 (for example
      a frame line).
      
      When memory redzones are enabled, a redzone corruption is reported.
      When they are not enabled, trashing of random memory occurs.
      
      Signed-off-by: default avatarMikulas Patocka <mpatocka@redhat.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      878b8619
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 · f984d024
      Linus Torvalds authored
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
        igb: fix link reporting when using sgmii
        igb: prevent skb_over panic w/ mtu smaller than 1K
        igb: Fix DCA errors and do not use context index for 82576
        ipv6: compile fix for ip6mr.c
        packet: Avoid lock_sock in mmap handler
        sfc: Replace stats_enabled flag with a disable count
        sfc: SFX7101/SFT9001: Fix AN advertisements
        sfc: SFT9001: Always enable XNP exchange on SFT9001 rev B
        sfc: Update board info for hardware monitor on SFN4111T-R5 and later
        sfc: Test for PHYXS faults whenever we cannot test link state bits
        sfc: Reinitialise the PHY completely in case of a PHY or NIC reset
        sfc: Fix post-reset MAC selection
        sfc: SFN4111T: Fix GPIO sharing between I2C and FLASH_CFG_1
        sfc: SFT9001: Fix speed reporting in 1G PHY loopback
        sfc: SFX7101: Remove workaround for bad link training
        sfc: SFT9001: Enable robust link training
        sky2: fix hard hang with netconsoling and iface going up
      f984d024
    • Linus Torvalds's avatar
      Stop playing silly games with the VM_ACCOUNT flag · fc8744ad
      Linus Torvalds authored
      
      The mmap_region() code would temporarily set the VM_ACCOUNT flag for
      anonymous shared mappings just to inform shmem_zero_setup() that it
      should enable accounting for the resulting shm object.  It would then
      clear the flag after calling ->mmap (for the /dev/zero case) or doing
      shmem_zero_setup() (for the MAP_ANON case).
      
      This just resulted in vma merge issues, but also made for just
      unnecessary confusion.  Use the already-existing VM_NORESERVE flag for
      this instead, and let shmem_{zero|file}_setup() just figure it out from
      that.
      
      This also happens to make it obvious that the new DRI2 GEM layer uses a
      non-reserving backing store for its object allocation - which is quite
      possibly not intentional.  But since I didn't want to change semantics
      in this patch, I left it alone, and just updated the caller to use the
      new flag semantics.
      
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      fc8744ad
  3. Jan 31, 2009
  4. Jan 30, 2009
Loading