1. 26 7月, 2012 5 次提交
  2. 14 7月, 2012 9 次提交
    • L
      Merge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging · ac7d181e
      Linus Torvalds 提交于
      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
    • L
      Merge tag 'nfs-for-3.5-4' of git://git.linux-nfs.org/projects/trondmy/linux-nfs · 4264e6a2
      Linus Torvalds 提交于
      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
    • D
      Remove easily user-triggerable BUG from generic_setlease · 8d657eb3
      Dave Jones 提交于
      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: NDave Jones <davej@redhat.com>
      Cc: stable@kernel.org # 3.2+
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      8d657eb3
    • L
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input · 39ea32ca
      Linus Torvalds 提交于
      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
    • L
      Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media · 8488e408
      Linus Torvalds 提交于
      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
    • L
      Merge tag 'mmc-fixes-for-3.5-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc · 2c913900
      Linus Torvalds 提交于
      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
    • L
      Merge tag 'for-linus-20120712' of git://git.infradead.org/linux-mtd · 36ec9fbf
      Linus Torvalds 提交于
      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
    • L
      Merge tag 'mfd-for-linus-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6 · 7801dc33
      Linus Torvalds 提交于
      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
    • L
      Merge tag 'sh-for-linus' of git://github.com/pmundt/linux-sh · 68394bfb
      Linus Torvalds 提交于
      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. 13 7月, 2012 4 次提交
  4. 12 7月, 2012 22 次提交
    • C
      SH: Convert out[bwl] macros to inline functions · 44033109
      Corey Minyard 提交于
      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: NCorey Minyard <cminyard@mvista.com>
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      44033109
    • L
      Merge tag 'fbdev-fixes-for-3.5-2' of git://github.com/schandinat/linux-2.6 · 918227bb
      Linus Torvalds 提交于
      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
    • L
      Merge branch 'akpm' (Andrew's patch-bomb) · 00c3e276
      Linus Torvalds 提交于
      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
    • Y
      memblock: free allocated memblock_reserved_regions later · 29f67386
      Yinghai Lu 提交于
      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: NSasha Levin <levinsasha928@gmail.com>
      Acked-by: NTejun Heo <tj@kernel.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NYinghai Lu <yinghai@kernel.org>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      29f67386
    • Y
      mm: sparse: fix usemap allocation above node descriptor section · 99ab7b19
      Yinghai Lu 提交于
      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: NYinghai Lu <yinghai@kernel.org>
      Signed-off-by: NJohannes Weiner <hannes@cmpxchg.org>
      Cc: <stable@vger.kernel.org>	[3.3.x, 3.4.x]
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      99ab7b19
    • Y
      mm: sparse: fix section usemap placement calculation · 07b4e2bc
      Yinghai Lu 提交于
      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: NYinghai Lu <yinghai@kernel.org>
      Signed-off-by: NJohannes Weiner <hannes@cmpxchg.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      07b4e2bc
    • A
      xtensa: fix incorrect memset · 688bb415
      Alan Cox 提交于
      Addresses: https://bugzilla.kernel.org/show_bug.cgi?id=43871
      
      Reported-by: <dcb314@hotmail.com>
      Signed-off-by: NAlan Cox <alan@linux.intel.com>
      Signed-off-by: NChris Zankel <chris@zankel.net>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      688bb415
    • H
      shmem: cleanup shmem_add_to_page_cache · b065b432
      Hugh Dickins 提交于
      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: NHugh Dickins <hughd@google.com>
      Acked-by: NJohannes Weiner <hannes@cmpxchg.org>
      Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
      Cc: Michal Hocko <mhocko@suse.cz>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      b065b432
    • H
      shmem: fix negative rss in memcg memory.stat · d1899228
      Hugh Dickins 提交于
      When adding the page_private checks before calling shmem_replace_page(), I
      did realize that there is a further race, but thought it too unlikely to
      need a hurried fix.
      
      But independently I've been chasing why a mem cgroup's memory.stat
      sometimes shows negative rss after all tasks have gone: I expected it to
      be a stats gathering bug, but actually it's shmem swapping's fault.
      
      It's an old surprise, that when you lock_page(lookup_swap_cache(swap)),
      the page may have been removed from swapcache before getting the lock; or
      it may have been freed and reused and be back in swapcache; and it can
      even be using the same swap location as before (page_private same).
      
      The swapoff case is already secure against this (swap cannot be reused
      until the whole area has been swapped off, and a new swapped on); and
      shmem_getpage_gfp() is protected by shmem_add_to_page_cache()'s check for
      the expected radix_tree entry - but a little too late.
      
      By that time, we might have already decided to shmem_replace_page(): I
      don't know of a problem from that, but I'd feel more at ease not to do so
      spuriously.  And we have already done mem_cgroup_cache_charge(), on
      perhaps the wrong mem cgroup: and this charge is not then undone on the
      error path, because PageSwapCache ends up preventing that.
      
      It's this last case which causes the occasional negative rss in
      memory.stat: the page is charged here as cache, but (sometimes) found to
      be anon when eventually it's uncharged - and in between, it's an
      undeserved charge on the wrong memcg.
      
      Fix this by adding an earlier check on the radix_tree entry: it's
      inelegant to descend the tree twice, but swapping is not the fast path,
      and a better solution would need a pair (try+commit) of memcg calls, and a
      rework of shmem_replace_page() to keep out of the swapcache.
      
      We can use the added shmem_confirm_swap() function to replace the
      find_get_page+page_cache_release we were already doing on the error path.
      And add a comment on that -EEXIST: it seems a peculiar errno to be using,
      but originates from its use in radix_tree_insert().
      
      [It can be surprising to see positive rss left in a memcg's memory.stat
      after all tasks have gone, since it is supposed to count anonymous but not
      shmem.  Aside from sharing anon pages via fork with a task in some other
      memcg, it often happens after swapping: because a swap page can't be freed
      while under writeback, nor while locked.  So it's not an error, and these
      residual pages are easily freed once pressure demands.]
      Signed-off-by: NHugh Dickins <hughd@google.com>
      Acked-by: NJohannes Weiner <hannes@cmpxchg.org>
      Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
      Cc: Michal Hocko <mhocko@suse.cz>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      d1899228
    • H
      tmpfs: revert SEEK_DATA and SEEK_HOLE · f21f8062
      Hugh Dickins 提交于
      Revert 4fb5ef08 ("tmpfs: support SEEK_DATA and SEEK_HOLE").  I believe
      it's correct, and it's been nice to have from rc1 to rc6; but as the
      original commit said:
      
      I don't know who actually uses SEEK_DATA or SEEK_HOLE, and whether it
      would be of any use to them on tmpfs.  This code adds 92 lines and 752
      bytes on x86_64 - is that bloat or worthwhile?
      
      Nobody asked for it, so I conclude that it's bloat: let's revert tmpfs to
      the dumb generic support for v3.5.  We can always reinstate it later if
      useful, and anyone needing it in a hurry can just get it out of git.
      Signed-off-by: NHugh Dickins <hughd@google.com>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: Josef Bacik <josef@redhat.com>
      Cc: Andi Kleen <andi@firstfloor.org>
      Cc: Andreas Dilger <adilger@dilger.ca>
      Cc: Dave Chinner <david@fromorbit.com>
      Cc: Marco Stornelli <marco.stornelli@gmail.com>
      Cc: Jeff liu <jeff.liu@oracle.com>
      Cc: Chris Mason <chris.mason@fusionio.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      f21f8062
    • K
      drivers/rtc/rtc-twl.c: fix threaded IRQ to use IRQF_ONESHOT · 6b91bf1a
      Kevin Hilman 提交于
      Requesting a threaded interrupt without a primary handler and without
      IRQF_ONESHOT is dangerous, and after commit 1c6c6952 ("genirq: Reject
      bogus threaded irq requests"), these requests are rejected.  This causes
      ->probe() to fail, and the RTC driver not to be availble.
      
      To fix, add IRQF_ONESHOT to the IRQ flags.
      
      Tested on OMAP3730/OveroSTORM and OMAP4430/Panda board using rtcwake to
      wake from system suspend multiple times.
      Signed-off-by: NKevin Hilman <khilman@ti.com>
      Cc: Alessandro Zummo <a.zummo@towertech.it>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      6b91bf1a
    • S
      fat: fix non-atomic NFS i_pos read · 5d8ecbbc
      Steven J. Magnani 提交于
      fat_encode_fh() can fetch an invalid i_pos value on systems where 64-bit
      accesses are not atomic.  Make it use the same accessor as the rest of the
      FAT code.
      Signed-off-by: NSteven J. Magnani <steve@digidescorp.com>
      Acked-by: NOGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      5d8ecbbc
    • K
      MAINTAINERS: add OMAP CPUfreq driver to OMAP Power Management section · c46938d4
      Kevin Hilman 提交于
      Add the OMAP CPUFreq driver to the list of files in the OMAP Power
      Management section.
      
      I've already been maintaining this driver, this just makes it official.
      Signed-off-by: NKevin Hilman <khilman@ti.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      c46938d4
    • D
      sgi-xp: nested calls to spin_lock_irqsave() · 8875408a
      Dan Carpenter 提交于
      The code here has a nested spin_lock_irqsave().  It's not needed since
      IRQs are already disabled and it causes a problem because it means that
      IRQs won't be enabled again at the end.  The second call to
      spin_lock_irqsave() will overwrite the value of irq_flags and we can't
      restore the proper settings.
      Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: NRobin Holt <holt@sgi.com>
      Cc: Jack Steiner <steiner@sgi.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      8875408a
    • B
      fs: ramfs: file-nommu: add SetPageUptodate() · fea9f718
      Bob Liu 提交于
      There is a bug in the below scenario for !CONFIG_MMU:
      
       1. create a new file
       2. mmap the file and write to it
       3. read the file can't get the correct value
      
      Because
      
        sys_read() -> generic_file_aio_read() -> simple_readpage() -> clear_page()
      
      which causes the page to be zeroed.
      
      Add SetPageUptodate() to ramfs_nommu_expand_for_mapping() so that
      generic_file_aio_read() do not call simple_readpage().
      Signed-off-by: NBob Liu <lliubbo@gmail.com>
      Cc: Hugh Dickins <hughd@google.com>
      Cc: David Howells <dhowells@redhat.com>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Greg Ungerer <gerg@uclinux.org>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      fea9f718
    • B
      drivers/rtc/rtc-mxc.c: fix irq enabled interrupts warning · b59f6d1f
      Benoît Thébaudeau 提交于
      Fixes
      
        WARNING: at irq/handle.c:146 handle_irq_event_percpu+0x19c/0x1b8()
        irq 25 handler mxc_rtc_interrupt+0x0/0xac enabled interrupts
        Modules linked in:
         (unwind_backtrace+0x0/0xf0) from (warn_slowpath_common+0x4c/0x64)
         (warn_slowpath_common+0x4c/0x64) from (warn_slowpath_fmt+0x30/0x40)
         (warn_slowpath_fmt+0x30/0x40) from (handle_irq_event_percpu+0x19c/0x1b8)
         (handle_irq_event_percpu+0x19c/0x1b8) from (handle_irq_event+0x28/0x38)
         (handle_irq_event+0x28/0x38) from (handle_level_irq+0x80/0xc4)
         (handle_level_irq+0x80/0xc4) from (generic_handle_irq+0x24/0x38)
         (generic_handle_irq+0x24/0x38) from (handle_IRQ+0x30/0x84)
         (handle_IRQ+0x30/0x84) from (avic_handle_irq+0x2c/0x4c)
         (avic_handle_irq+0x2c/0x4c) from (__irq_svc+0x40/0x60)
        Exception stack(0xc050bf60 to 0xc050bfa8)
        bf60: 00000001 00000000 003c4208 c0018e20 c050a000 c050a000 c054a4c8 c050a000
        bf80: c05157a8 4117b363 80503bb4 00000000 01000000 c050bfa8 c0018e2c c000e808
        bfa0: 60000013 ffffffff
         (__irq_svc+0x40/0x60) from (default_idle+0x1c/0x30)
         (default_idle+0x1c/0x30) from (cpu_idle+0x68/0xa8)
         (cpu_idle+0x68/0xa8) from (start_kernel+0x22c/0x26c)
      Signed-off-by: NBenoît Thébaudeau <benoit.thebaudeau@advansee.com>
      Cc: Alessandro Zummo <a.zummo@towertech.it>
      Cc: Sascha Hauer <kernel@pengutronix.de>
      Acked-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      b59f6d1f
    • W
      mm/memory_hotplug.c: release memory resources if hotadd_new_pgdat() fails · 41b9e2d7
      Wen Congyang 提交于
      We should goto error to release memory resource if hotadd_new_pgdat()
      failed.
      Signed-off-by: NWen Congyang <wency@cn.fujitsu.com>
      Cc: Yasuaki ISIMATU <isimatu.yasuaki@jp.fujitsu.com>
      Acked-by: NDavid Rientjes <rientjes@google.com>
      Cc: Len Brown <lenb@kernel.org>
      Cc: "Brown, Len" <len.brown@intel.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      41b9e2d7
    • G
      h8300/uaccess: add mising __clear_user() · 213ab3f9
      Geert Uytterhoeven 提交于
      Fix the build error:
      
        include/linux/regset.h: In function 'user_regset_copyout_zero':
        include/linux/regset.h:289:3: error: implicit declaration of function '__clear_user' [-Werror=implicit-function-declaration]
      Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
      Cc: Tony Breeds <tony@bakeyournoodle.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      213ab3f9
    • G
      h8300/uaccess: remove assignment to __gu_val in unhandled case of get_user() · e048aceb
      Geert Uytterhoeven 提交于
      __gu_val is const if the passed ptr is const, giving:
      
        include/linux/pagemap.h: In function 'fault_in_pages_readable':
        include/linux/pagemap.h:442:2: error: assignment of read-only variable '__gu_val'
        include/linux/pagemap.h:448:4: error: assignment of read-only variable '__gu_val'
        include/linux/pagemap.h: In function 'fault_in_multipages_readable':
        include/linux/pagemap.h:499:3: error: assignment of read-only variable '__gu_val'
        include/linux/pagemap.h:508:3: error: assignment of read-only variable '__gu_val'
        make[4]: *** [init/main.o] Error 1
      
      As we don't care about the actual value of __gu_val in the unhandled
      case (it will cause a link error anyway), just remove the assignment.
      Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
      Cc: Tony Breeds <tony@bakeyournoodle.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      e048aceb
    • G
      h8300/time: add missing #include <asm/irq_regs.h> · 487c719c
      Geert Uytterhoeven 提交于
      Fix the build error:
      
        arch/h8300/kernel/time.c: In function 'h8300_timer_tick':
        arch/h8300/kernel/time.c:39:2: error: implicit declaration of function 'get_irq_regs' [-Werror=implicit-function-declaration]
        arch/h8300/kernel/time.c:39:42: error: invalid type argument of '->' (have 'int')
      Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
      Cc: Tony Breeds <tony@bakeyournoodle.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      487c719c
    • G
      h8300/signal: fix typo "statis" · 8782171e
      Geert Uytterhoeven 提交于
      The keyword is "static", not "statis":
      
        arch/h8300/kernel/signal.c:455:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void'
        arch/h8300/kernel/signal.c: In function 'do_notify_resume':
        arch/h8300/kernel/signal.c:511:3: error: implicit declaration of function 'do_signal' [-Werror=implicit-function-declaration]
        arch/h8300/kernel/signal.c: At top level:
        arch/h8300/kernel/signal.c:414:1: warning: 'handle_signal' defined but not used [-Wunused-function]
      
      Introduced in commit 7ae4e32a ("h8300: switch to saved_sigmask-based
      sigsuspend/rt_sigsuspend")
      Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
      Cc: Tony Breeds <tony@bakeyournoodle.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      8782171e
    • G
      h8300/pgtable: add missing #include <asm-generic/pgtable.h> · 9adec610
      Geert Uytterhoeven 提交于
      Fix the h8300 build error:
      
        kernel/sched/core.c: In function 'context_switch':
        kernel/sched/core.c:2061:2: error: implicit declaration of function 'arch_start_context_switch' [-Werror=implicit-function-declaration]
      Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
      Cc: Tony Breeds <tony@bakeyournoodle.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      9adec610