Skip to content
  1. Jul 15, 2012
    • Linus Torvalds's avatar
      Merge tag 'sound-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · 1daaa5e4
      Linus Torvalds authored
      Pull sound fixes from Takashi Iwai:
       "Containing the regression fixes for USB-audio due to the transition to
        the new streaming logic, mostly found on Logitech webcams."
      
      * tag 'sound-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
        ALSA: snd-usb: move calls to usb_set_interface
        ALSA: usb-audio: Fix the first PCM interface assignment
      1daaa5e4
    • Linus Torvalds's avatar
      Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux · c5b01acf
      Linus Torvalds authored
      Pull ACPI patch from Len Brown.
      
      * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux:
        ACPICA: Fix possible fault in return package object repair code
      c5b01acf
    • Will Drewry's avatar
      vsyscall_64: add missing ifdef CONFIG_SECCOMP · 09d31442
      Will Drewry authored
      
      
      vsyscall_seccomp introduced a dependency on __secure_computing.  On
      configurations with CONFIG_SECCOMP disabled, compilation will fail.
      
      Reported-by: default avatarfeng xiangjun <fengxj325@gmail.com>
      Signed-off-by: default avatarWill Drewry <wad@chromium.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      09d31442
    • Linus Torvalds's avatar
      Merge tag 'cpufreq-for-3.5-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · a7559b13
      Linus Torvalds authored
      Pull cpufreq fix from Rafael Wysocki:
       "This fixes a regression preventing the ACPI cpufreq driver from
        loading on some systems where it worked previously without any
        problems."
      
      * tag 'cpufreq-for-3.5-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        cpufreq / ACPI: Fix not loading acpi-cpufreq driver regression
      a7559b13
    • Linus Torvalds's avatar
      Merge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc · e60d7458
      Linus Torvalds authored
      Pull ARM Samsung SoC fixes from Arnd Bergmann.
      
      * tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
        ARM: S3C24XX: Correct CAMIF interrupt definitions
        ARM: S3C24XX: Correct AC97 clock control bit for S3C2440
        ARM: SAMSUNG: fix race in s3c_adc_start for ADC
        ARM: SAMSUNG: Update default rate for xusbxti clock
        ARM: EXYNOS: register devices in 'need_restore' state for pm_domains
        ARM: EXYNOS: read initial state of power domain from hw registers
      e60d7458
    • Linus Torvalds's avatar
      Merge branches 'core-urgent-for-linus', 'perf-urgent-for-linus' and... · ab93eb82
      Linus Torvalds authored
      Merge branches 'core-urgent-for-linus', 'perf-urgent-for-linus' and 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
      
      Pull RCU, perf, and scheduler fixes from Ingo Molnar.
      
      The RCU fix is a revert for an optimization that could cause deadlocks.
      
      One of the scheduler commits (164c33c6 "sched: Fix fork() error path
      to not crash") is correct but not complete (some architectures like Tile
      are not covered yet) - the resulting additional fixes are still WIP and
      Ingo did not want to delay these pending fixes.  See this thread on
      lkml:
      
        [PATCH] fork: fix error handling in dup_task()
      
      The perf fixes are just trivial oneliners.
      
      * 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        Revert "rcu: Move PREEMPT_RCU preemption to switch_to() invocation"
      
      * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        perf kvm: Fix segfault with report and mixed guestmount use
        perf kvm: Fix regression with guest machine creation
        perf script: Fix format regression due to libtraceevent merge
        ring-buffer: Fix accounting of entries when removing pages
        ring-buffer: Fix crash due to uninitialized new_pages list head
      
      * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        MAINTAINERS/sched: Update scheduler file pattern
        sched/nohz: Rewrite and fix load-avg computation -- again
        sched: Fix fork() error path to not crash
      ab93eb82
  2. Jul 14, 2012
    • Bob Moore's avatar
      ACPICA: Fix possible fault in return package object repair code · 46befd6b
      Bob Moore authored
      Fixes a problem that can occur when a lone package object is
      wrapped with an outer package object in order to conform to
      the ACPI specification. Can affect these predefined names:
      _ALR,_MLS,_PSS,_TRT,_TSS,_PRT,_HPX,_DLM,_CSD,_PSD,_TSD
      
      https://bugzilla.kernel.org/show_bug.cgi?id=44171
      
      This problem was introduced in 3.4-rc1 by commit
      6a99b1c9
      
      
      (ACPICA: Object repair code: Support to add Package wrappers)
      
      Reported-by: default avatarVlastimil Babka <caster@gentoo.org>
      Signed-off-by: default avatarBob Moore <robert.moore@intel.com>
      Signed-off-by: default avatarLin Ming <ming.m.lin@intel.com>
      Cc: <stable@vger.kernel.org> # 3.4
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      46befd6b
    • Arnd Bergmann's avatar
      Merge branch 'v3.5-samsung-fixes-2' of... · df4732ab
      Arnd Bergmann authored
      
      Merge branch 'v3.5-samsung-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into fixes
      
      From Kukjin Kim <kgene.kim@samsung.com>:
      
      * 'v3.5-samsung-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung:
        ARM: S3C24XX: Correct CAMIF interrupt definitions
        ARM: S3C24XX: Correct AC97 clock control bit for S3C2440
        ARM: SAMSUNG: fix race in s3c_adc_start for ADC
        ARM: SAMSUNG: Update default rate for xusbxti clock
        ARM: EXYNOS: register devices in 'need_restore' state for pm_domains
        ARM: EXYNOS: read initial state of power domain from hw registers
      
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      df4732ab
    • Linus Torvalds's avatar
      Merge tag 'md-3.5-fixes' of git://neil.brown.name/md · fdb1335a
      Linus Torvalds authored
      Pull use-after-free RAID1 bugfix from NeilBrown.
      
      * tag 'md-3.5-fixes' of git://neil.brown.name/md:
        md/raid1: fix use-after-free bug in RAID1 data-check code.
      fdb1335a
    • Linus Torvalds's avatar
      Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · d55e5bd0
      Linus Torvalds authored
      Pull the leap second fixes from Thomas Gleixner:
       "It's a rather large series, but well discussed, refined and reviewed.
        It got a massive testing by John, Prarit and tip.
      
        In theory we could split it into two parts.  The first two patches
      
          f55a6faa: hrtimer: Provide clock_was_set_delayed()
          4873fa07: timekeeping: Fix leapsecond triggered load spike issue
      
        are merely preventing the stuff loops forever issues, which people
        have observed.
      
        But there is no point in delaying the other 4 commits which achieve
        full correctness into 3.6 as they are tagged for stable anyway.  And I
        rather prefer to have the full fixes merged in bulk than a "prevent
        the observable wreckage and deal with the hidden fallout later"
        approach."
      
      * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        hrtimer: Update hrtimer base offsets each hrtimer_interrupt
        timekeeping: Provide hrtimer update function
        hrtimers: Move lock held region in hrtimer_interrupt()
        timekeeping: Maintain ktime_t based offsets for hrtimers
        timekeeping: Fix leapsecond triggered load spike issue
        hrtimer: Provide clock_was_set_delayed()
      d55e5bd0
    • Will Drewry's avatar
      x86/vsyscall: allow seccomp filter in vsyscall=emulate · 5651721e
      Will Drewry authored
      
      
      If a seccomp filter program is installed, older static binaries and
      distributions with older libc implementations (glibc 2.13 and earlier)
      that rely on vsyscall use will be terminated regardless of the filter
      program policy when executing time, gettimeofday, or getcpu.  This is
      only the case when vsyscall emulation is in use (vsyscall=emulate is the
      default).
      
      This patch emulates system call entry inside a vsyscall=emulate by
      populating regs->ax and regs->orig_ax with the system call number prior
      to calling into seccomp such that all seccomp-dependencies function
      normally.  Additionally, system call return behavior is emulated in line
      with other vsyscall entrypoints for the trace/trap cases.
      
      [ v2: fixed ip and sp on SECCOMP_RET_TRAP/TRACE (thanks to luto@mit.edu) ]
      Reported-and-tested-by: default avatarOwen Kibel <qmewlo@gmail.com>
      Signed-off-by: default avatarWill Drewry <wad@chromium.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      5651721e
    • Linus Torvalds's avatar
      Merge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging · ac7d181e
      Linus Torvalds authored
      Please pull one hwmon subsystem fix from Jean Delvare.
      
      * 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging:
        hwmon: (it87) Preserve configuration register bits on init
      ac7d181e
    • Linus Torvalds's avatar
      Merge tag 'nfs-for-3.5-4' of git://git.linux-nfs.org/projects/trondmy/linux-nfs · 4264e6a2
      Linus Torvalds authored
      Pull NFS client bugfixes from Trond Myklebust:
       - Fix an NFSv4 mount regression
       - Fix O_DIRECT list manipulation snafus
      
      * tag 'nfs-for-3.5-4' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
        NFSv4: Fix an NFSv4 mount regression
        NFS: Fix list manipulation snafus in fs/nfs/direct.c
      4264e6a2
    • Dave Jones's avatar
      Remove easily user-triggerable BUG from generic_setlease · 8d657eb3
      Dave Jones authored
      
      
      This can be trivially triggered from userspace by passing in something unexpected.
      
          kernel BUG at fs/locks.c:1468!
          invalid opcode: 0000 [#1] SMP
          RIP: 0010:generic_setlease+0xc2/0x100
          Call Trace:
            __vfs_setlease+0x35/0x40
            fcntl_setlease+0x76/0x150
            sys_fcntl+0x1c6/0x810
            system_call_fastpath+0x1a/0x1f
      
      Signed-off-by: default avatarDave Jones <davej@redhat.com>
      Cc: stable@kernel.org # 3.2+
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      8d657eb3
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input · 39ea32ca
      Linus Torvalds authored
      Pull input layer fixes from Dmitry Torokhov:
       "The changes are limited to adding new VID/PID combinations to drivers
        to enable support for new versions of hardware, most notably hardware
        found in new MacBook Pro Retina boxes."
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
        Input: xpad - add Andamiro Pump It Up pad
        Input: xpad - add signature for Razer Onza Tournament Edition
        Input: xpad - handle all variations of Mad Catz Beat Pad
        Input: bcm5974 - Add support for 2012 MacBook Pro Retina
        HID: add support for 2012 MacBook Pro Retina
      39ea32ca
    • Linus Torvalds's avatar
      Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media · 8488e408
      Linus Torvalds authored
      Pull media fixes from Mauro Carvalho Chehab:
       - Some regression fixes at the audio part for devices with
         cx23885/cx25840
       - A DMA corruption fix at cx231xx
       - two fixes at the winbond IR driver
       - Several fixes for the EXYNOS media driver (s5p)
       - two fixes at the OMAP3 preview driver
       - one fix at the dvb core failure path
       - an include missing (slab.h) at smiapp-core causing compilation
         breakage
       - em28xx was not loading the IR driver driver anymore.
      
      * 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (31 commits)
        [media] Revert "[media] V4L: JPEG class documentation corrections"
        [media] s5p-fimc: Add missing FIMC-LITE file operations locking
        [media] omap3isp: preview: Fix contrast and brightness handling
        [media] omap3isp: preview: Fix output size computation depending on input format
        [media] winbond-cir: Initialise timeout, driver_type and allowed_protos
        [media] winbond-cir: Fix txandrx module info
        [media] cx23885: Silence unknown command warnings
        [media] cx23885: add support for HVR-1255 analog (cx23888 variant)
        [media] cx23885: make analog support work for HVR_1250 (cx23885 variant)
        [media] cx25840: fix vsrc/hsrc usage on cx23888 designs
        [media] cx25840: fix regression in HVR-1800 analog audio
        [media] cx25840: fix regression in analog support hue/saturation controls
        [media] cx25840: fix regression in HVR-1800 analog support
        [media] s5p-mfc: Fixed setup of custom controls in decoder and encoder
        [media] cx231xx: don't DMA to random addresses
        [media] em28xx: fix em28xx-rc load
        [media] dvb-core: Release semaphore on error path dvb_register_device()
        [media] s5p-fimc: Stop media entity pipeline if fimc_pipeline_validate fails
        [media] s5p-fimc: Fix compiler warning in fimc-lite.c
        [media] s5p-fimc: media_entity_pipeline_start() may fail
        ...
      8488e408
    • Linus Torvalds's avatar
      Merge tag 'mmc-fixes-for-3.5-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc · 2c913900
      Linus Torvalds authored
      Pull MMC fixes from Chris Ball:
       - Revert a patch that made failing to select power class fatal;
         it turns out that it fails non-fatally on Tegra boards.
         Regression against 3.5-rc1.
       - Add the IRQF_ONESHOT flag to the cd-gpio driver, which turned
         into a regression in 3.5-rc1 when IRQF_ONESHOT became required
         for threaded IRQs with no handler.
      
      * tag 'mmc-fixes-for-3.5-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc:
        mmc: cd-gpio: pass IRQF_ONESHOT to request_threaded_irq()
        mmc: core: Revert "skip card initialization if power class selection fails"
      2c913900
    • Linus Torvalds's avatar
      Merge tag 'for-linus-20120712' of git://git.infradead.org/linux-mtd · 36ec9fbf
      Linus Torvalds authored
      Pull late MTD fixes from David Woodhouse:
       - fix 'sparse warning fix' regression which totally breaks MXC NAND
       - fix GPMI NAND regression when used with UBI
       - update/correct sysfs documentation for new 'bitflip_threshold' field
       - fix nandsim build failure
      
      * tag 'for-linus-20120712' of git://git.infradead.org/linux-mtd:
        mtd: nandsim: don't open code a do_div helper
        mtd: ABI documentation: clarification of bitflip_threshold
        mtd: gpmi-nand: fix read page when reading to vmalloced area
        mtd: mxc_nand: use 32bit copy functions
      36ec9fbf
    • Linus Torvalds's avatar
      Merge tag 'mfd-for-linus-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6 · 7801dc33
      Linus Torvalds authored
      Pull MFD Fixes from Samuel Ortiz:
       - Three Palmas fixes, One of them being a build error fix.
       - Two mc13xx fixes.  One for fixing an SPI regmap configuration and
         another one for working around an i.Mx hardware bug.
       - One omap-usb regression fix.
       - One twl6040 build breakage fix.
       - One file deletion (ab5500-core.h) that was overlooked during the last
         merge window.
      
      * tag 'mfd-for-linus-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6:
        mfd: Add missing hunk to change palmas irq to clear on read
        mfd: Fix palmas regulator pdata missing
        mfd: USB: Fix the omap-usb EHCI ULPI PHY reset fix issues.
        mfd: Update twl6040 Kconfig to avoid build breakage
        mfd: Delete ab5500-core.h
        mfd: mc13xxx workaround SPI hardware bug on i.Mx
        mfd: Fix mc13xxx SPI regmap
        mfd: Add terminating entry for i2c_device_id palmas table
      7801dc33
    • Linus Torvalds's avatar
      Merge tag 'sh-for-linus' of git://github.com/pmundt/linux-sh · 68394bfb
      Linus Torvalds authored
      Pull SuperH fixes from Paul Mundt.
      
      * tag 'sh-for-linus' of git://github.com/pmundt/linux-sh:
        SH: Convert out[bwl] macros to inline functions
        sh: Fix up se7721 GPIOLIB=y build warnings.
      68394bfb
  3. Jul 13, 2012
  4. Jul 12, 2012
    • Marek Szyprowski's avatar
      ARM: EXYNOS: register devices in 'need_restore' state for pm_domains · ebc35c72
      Marek Szyprowski authored
      Commit ca1d72f0 ('PM / Domains: Make it possible to add devices to
      inactive domains') introduced possibility to add devices to inactive
      power domains and added pm_genpd_dev_need_restore() function which lets
      platform core to notify power domain core that the specified device must
      be restored (with its runtime_resume() callback) before first use.
      
      This patch adds the pm_genpd_dev_need_restore() call what brings back
      the suspend/resume behaviour for the client devices known from the
      previous power domain driver (removed by commit 91cfbd4e
      
       - 'ARM:
      EXYNOS: Hook up power domains to generic power domain infrastructure').
      Client device drivers relay on that suspend/resume behaviour, thus this
      patch fixes runtime pm operation for client devices.
      
      Signed-off-by: default avatarMarek Szyprowski <m.szyprowski@samsung.com>
      Reviewed-by: default avatarKyungmin Park <kyungmin.park@samsung.com>
      Signed-off-by: default avatarKukjin Kim <kgene.kim@samsung.com>
      ebc35c72
    • Marek Szyprowski's avatar
      ARM: EXYNOS: read initial state of power domain from hw registers · 76eb5567
      Marek Szyprowski authored
      
      
      Some bootloaders disable unused power domains to reduce power
      consuption. Power domain driver can easily read the actual state from
      the hardware registers instead of assuming that their initial state is
      always 'on'.
      
      Signed-off-by: default avatarMarek Szyprowski <m.szyprowski@samsung.com>
      Reviewed-by: default avatarKyungmin Park <kyungmin.park@samsung.com>
      Signed-off-by: default avatarKukjin Kim <kgene.kim@samsung.com>
      76eb5567
    • Corey Minyard's avatar
      SH: Convert out[bwl] macros to inline functions · 44033109
      Corey Minyard authored
      
      
      The macros just called BUG(), but that results in unused variable
      warnings all over the place, like in the IPMI driver.  The build
      regression emails were annoying me, so here's the fix.  I have
      not even compile tested this, but it's rather obvious.
      
      [ port type mangled to unsigned long ]
      
      Signed-off-by: default avatarCorey Minyard <cminyard@mvista.com>
      Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
      44033109
    • Linus Torvalds's avatar
      Merge tag 'fbdev-fixes-for-3.5-2' of git://github.com/schandinat/linux-2.6 · 918227bb
      Linus Torvalds authored
      Pull fbdev fixes from Florian Tobias Schandinat:
       "Two fixes for OMAPDSS by Tomi Valkeinen:
         - one to avoid warnings when runtime PM is not enabled
         - one workaround to dependancy issues during suspend/resume"
      
      * tag 'fbdev-fixes-for-3.5-2' of git://github.com/schandinat/linux-2.6:
        OMAPDSS: fix warnings if CONFIG_PM_RUNTIME=n
        OMAPDSS: Use PM notifiers for system suspend
      918227bb
    • Linus Torvalds's avatar
      Merge branch 'akpm' (Andrew's patch-bomb) · 00c3e276
      Linus Torvalds authored
      Merge random patches from Andrew Morton.
      
      * Merge emailed patches from Andrew Morton <akpm@linux-foundation.org>: (32 commits)
        memblock: free allocated memblock_reserved_regions later
        mm: sparse: fix usemap allocation above node descriptor section
        mm: sparse: fix section usemap placement calculation
        xtensa: fix incorrect memset
        shmem: cleanup shmem_add_to_page_cache
        shmem: fix negative rss in memcg memory.stat
        tmpfs: revert SEEK_DATA and SEEK_HOLE
        drivers/rtc/rtc-twl.c: fix threaded IRQ to use IRQF_ONESHOT
        fat: fix non-atomic NFS i_pos read
        MAINTAINERS: add OMAP CPUfreq driver to OMAP Power Management section
        sgi-xp: nested calls to spin_lock_irqsave()
        fs: ramfs: file-nommu: add SetPageUptodate()
        drivers/rtc/rtc-mxc.c: fix irq enabled interrupts warning
        mm/memory_hotplug.c: release memory resources if hotadd_new_pgdat() fails
        h8300/uaccess: add mising __clear_user()
        h8300/uaccess: remove assignment to __gu_val in unhandled case of get_user()
        h8300/time: add missing #include <asm/irq_regs.h>
        h8300/signal: fix typo "statis"
        h8300/pgtable: add missing #include <asm-generic/pgtable.h>
        drivers/rtc/rtc-ab8500.c: ensure correct probing of the AB8500 RTC when Device Tree is enabled
        ...
      00c3e276
    • Yinghai Lu's avatar
      memblock: free allocated memblock_reserved_regions later · 29f67386
      Yinghai Lu authored
      
      
      memblock_free_reserved_regions() calls memblock_free(), but
      memblock_free() would double reserved.regions too, so we could free the
      old range for reserved.regions.
      
      Also tj said there is another bug which could be related to this.
      
      | I don't think we're saving any noticeable
      | amount by doing this "free - give it to page allocator - reserve
      | again" dancing.  We should just allocate regions aligned to page
      | boundaries and free them later when memblock is no longer in use.
      
      in that case, when DEBUG_PAGEALLOC, will get panic:
      
           memblock_free: [0x0000102febc080-0x0000102febf080] memblock_free_reserved_regions+0x37/0x39
        BUG: unable to handle kernel paging request at ffff88102febd948
        IP: [<ffffffff836a5774>] __next_free_mem_range+0x9b/0x155
        PGD 4826063 PUD cf67a067 PMD cf7fa067 PTE 800000102febd160
        Oops: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC
        CPU 0
        Pid: 0, comm: swapper Not tainted 3.5.0-rc2-next-20120614-sasha #447
        RIP: 0010:[<ffffffff836a5774>]  [<ffffffff836a5774>] __next_free_mem_range+0x9b/0x155
      
      See the discussion at https://lkml.org/lkml/2012/6/13/469
      
      So try to allocate with PAGE_SIZE alignment and free it later.
      
      Reported-by: default avatarSasha Levin <levinsasha928@gmail.com>
      Acked-by: default avatarTejun Heo <tj@kernel.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: default avatarYinghai Lu <yinghai@kernel.org>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      29f67386
    • Yinghai Lu's avatar
      mm: sparse: fix usemap allocation above node descriptor section · 99ab7b19
      Yinghai Lu authored
      After commit f5bf18fa ("bootmem/sparsemem: remove limit constraint
      in alloc_bootmem_section"), usemap allocations may easily be placed
      outside the optimal section that holds the node descriptor, even if
      there is space available in that section.  This results in unnecessary
      hotplug dependencies that need to have the node unplugged before the
      section holding the usemap.
      
      The reason is that the bootmem allocator doesn't guarantee a linear
      search starting from the passed allocation goal but may start out at a
      much higher address absent an upper limit.
      
      Fix this by trying the allocation with the limit at the section end,
      then retry without if that fails.  This keeps the fix from f5bf18fa
      
      
      of not panicking if the allocation does not fit in the section, but
      still makes sure to try to stay within the section at first.
      
      Signed-off-by: default avatarYinghai Lu <yinghai@kernel.org>
      Signed-off-by: default avatarJohannes Weiner <hannes@cmpxchg.org>
      Cc: <stable@vger.kernel.org>	[3.3.x, 3.4.x]
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      99ab7b19
    • Yinghai Lu's avatar
      mm: sparse: fix section usemap placement calculation · 07b4e2bc
      Yinghai Lu authored
      Commit 238305bb
      
       ("mm: remove sparsemem allocation details from the
      bootmem allocator") introduced a bug in the allocation goal calculation
      that put section usemaps not in the same section as the node
      descriptors, creating unnecessary hotplug dependencies between them:
      
        node 0 must be removed before remove section 16399
        node 1 must be removed before remove section 16399
        node 2 must be removed before remove section 16399
        node 3 must be removed before remove section 16399
        node 4 must be removed before remove section 16399
        node 5 must be removed before remove section 16399
        node 6 must be removed before remove section 16399
      
      The reason is that it applies PAGE_SECTION_MASK to the physical address
      of the node descriptor when finding a suitable place to put the usemap,
      when this mask is actually intended to be used with PFNs.  Because the
      PFN mask is wider, the target address will point beyond the wanted
      section holding the node descriptor and the node must be offlined before
      the section holding the usemap can go.
      
      Fix this by extending the mask to address width before use.
      
      Signed-off-by: default avatarYinghai Lu <yinghai@kernel.org>
      Signed-off-by: default avatarJohannes Weiner <hannes@cmpxchg.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      07b4e2bc
    • Alan Cox's avatar
      xtensa: fix incorrect memset · 688bb415
      Alan Cox authored
      
      
      Addresses: https://bugzilla.kernel.org/show_bug.cgi?id=43871
      
      Reported-by: default avatar <dcb314@hotmail.com>
      Signed-off-by: default avatarAlan Cox <alan@linux.intel.com>
      Signed-off-by: default avatarChris Zankel <chris@zankel.net>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      688bb415
    • Hugh Dickins's avatar
      shmem: cleanup shmem_add_to_page_cache · b065b432
      Hugh Dickins authored
      
      
      shmem_add_to_page_cache() has three callsites, but only one of them wants
      the radix_tree_preload() (an exceptional entry guarantees that the radix
      tree node is present in the other cases), and only that site can achieve
      mem_cgroup_uncharge_cache_page() (PageSwapCache makes it a no-op in the
      other cases).  We did it this way originally to reflect
      add_to_page_cache_locked(); but it's confusing now, so move the radix_tree
      preloading and mem_cgroup uncharging to that one caller.
      
      Signed-off-by: default avatarHugh Dickins <hughd@google.com>
      Acked-by: default avatarJohannes Weiner <hannes@cmpxchg.org>
      Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
      Cc: Michal Hocko <mhocko@suse.cz>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      b065b432