1. 30 Jan, 2014 24 commits
    • Linus Torvalds's avatar
      Merge branch 'x86-x32-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · cca21640
      Linus Torvalds authored
      Pull more x32 uabi type fixes from Peter Anvin:
       "Despite the branch name, **most of these changes are to generic
        code**.  They change types so that they make an increasing amount of
        the exported uapi kernel headers usable for libc.
      
        The ARM64 people are also interested in these changes for their ILP32
        ABI"
      
      * 'x86-x32-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        uapi: Use __kernel_long_t in struct mq_attr
        uapi: Use __kernel_ulong_t in shmid64_ds/shminfo64/shm_info
        x86, uapi, x32: Use __kernel_ulong_t in x86 struct semid64_ds
        uapi: Use __kernel_ulong_t in struct msqid64_ds
        uapi: Use __kernel_long_t in struct msgbuf
        uapi, asm-generic: Use __kernel_ulong_t in uapi struct ipc64_perm
        uapi: Use __kernel_long_t/__kernel_ulong_t in <linux/resource.h>
        uapi: Use __kernel_long_t in struct timex
      cca21640
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://ftp.arm.linux.org.uk/~rmk/linux-arm · e914e3f4
      Linus Torvalds authored
      Pull more ARM updates from Russell King:
       "Some further changes for this merge window:
         - fix bug building with gcc 4.6.4 and EABI.
         - fix pgtbl macro with some LPAE configurations
         - fix initrd override - FDT was overriding the command line, and it
           should be the other way around.
         - fix byteswap of instructions in undefined instruction handler
         - add basic support for SolidRun Hummingboard and Cubox-i boards"
      
      * 'for-linus' of git://ftp.arm.linux.org.uk/~rmk/linux-arm:
        ARM: fix building with gcc 4.6.4
        ARM: 7941/2: Fix incorrect FDT initrd parameter override
        ARM: 7947/1: Make pgtbl macro more robust
        ARM: 7946/1: asm: __und_usr_thumb need byteswap instructions in BE case
        ARM: 7930/1: Introduce atomic MMIO modify
        ARM: imx: initial SolidRun Cubox-i support
        ARM: imx: initial SolidRun HummingBoard support
      e914e3f4
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · 1d494f36
      Linus Torvalds authored
      Pull networking fixes from David Miller:
       "Several fixups, of note:
      
        1) Fix unlock of not held spinlock in RXRPC code, from Alexey
           Khoroshilov.
      
        2) Call pci_disable_device() from the correct shutdown path in bnx2x
           driver, from Yuval Mintz.
      
        3) Fix qeth build on s390 for some configurations, from Eugene
           Crosser.
      
        4) Cure locking bugs in bond_loadbalance_arp_mon(), from Ding
           Tianhong.
      
        5) Must do netif_napi_add() before registering netdevice in sky2
           driver, from Stanislaw Gruszka.
      
        6) Fix lost bug fix during merge due to code movement in ieee802154,
           noticed and fixed by the eagle eyed Stephen Rothwell.
      
        7) Get rid of resource leak in xen-netfront driver, from Annie Li.
      
        8) Bounds checks in qlcnic driver are off by one, from Manish Chopra.
      
        9) TPROXY can leak sockets when TCP early demux is enabled, fix from
           Holger Eitzenberger"
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (32 commits)
        qeth: fix build of s390 allmodconfig
        bonding: fix locking in bond_loadbalance_arp_mon()
        tun: add device name(iff) field to proc fdinfo entry
        DT: net: davinci_emac: "ti, davinci-no-bd-ram" property is actually optional
        DT: net: davinci_emac: "ti, davinci-rmii-en" property is actually optional
        bnx2x: Fix generic option settings
        net: Fix warning on make htmldocs caused by skbuff.c
        llc: remove noisy WARN from llc_mac_hdr_init
        qlcnic: Fix loopback test failure
        qlcnic: Fix tx timeout.
        qlcnic: Fix initialization of vlan list.
        qlcnic: Correct off-by-one errors in bounds checks
        net: Document promote_secondaries
        net: gre: use icmp_hdr() to get inner ip header
        i40e: Add missing braces to i40e_dcb_need_reconfig()
        xen-netfront: fix resource leak in netfront
        net: 6lowpan: fixup for code movement
        hyperv: Add support for physically discontinuous receive buffer
        sky2: initialize napi before registering device
        net: Fix memory leak if TPROXY used with TCP early demux
        ...
      1d494f36
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc · 19ba20f4
      Linus Torvalds authored
      Pull sparc update from David Miller:
       "Two cleanups from Paul Gortmaker and hook up the new scheduler system
        calls"
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc:
        sparc: Hook up sched_setattr and sched_getattr syscalls.
        sparc: don't use module_init in non-modular pci.c code
        sparc: delete non-required instances of include <linux/init.h>
      19ba20f4
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide · 3308ee8f
      Linus Torvalds authored
      Pull IDE fixes from David Miller:
       "Two header file inclusion fixes from Rashika Kheria"
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide:
        drivers: ide: Include appropriate header file in ide-pio-blacklist.c
        drivers: ide: Include appropriate header file in ide-cd_verbose.c
      3308ee8f
    • Linus Torvalds's avatar
      Merge branch 'akpm' (patches from Andrew Morton) · 13293115
      Linus Torvalds authored
      Merge random fixes from Andrew Morton:
       "Random fixes.
      
        I have one batch remaining for -rc1, mainly zram changes which await a
        merge of Jens's trees"
      
      * emailed patches fron Andrew Morton akpm@linux-foundation.org>:
        MAINTAINERS: ADI Linux development mailing lists: change to the new server
        Documentation: fix multiple typo occurences s/KenelVersion/KernelVersion/
        dma-debug: fix overlap detection
        memblock: add limit checking to memblock_virt_alloc
        mm/readahead.c: fix do_readahead() for no readpage(s)
        mm/slub.c: do not VM_BUG_ON_PAGE() for temporary on-stack pages
        slab: fix wrong retval on kmem_cache_create_memcg error path
        s390/compat: change parameter types from unsigned long to compat_ulong_t
        fs/compat: fix lookup_dcookie() parameter handling
        fs/compat: fix parameter handling for compat readv/writev syscalls
        mm/mempolicy.c: convert to pr_foo()
        mm: numa: initialise numa balancing after jump label initialisation
        mm/page-writeback.c: do not count anon pages as dirtyable memory
        mm/page-writeback.c: fix dirty_balance_reserve subtraction from dirtyable memory
        mm: document improved handling of swappiness==0
        lib/genalloc.c: add check gen_pool_dma_alloc() if dma pointer is not NULL
      13293115
    • Sonic Zhang's avatar
      MAINTAINERS: ADI Linux development mailing lists: change to the new server · a4edbc10
      Sonic Zhang authored
      Update Blackfin arch maintainer's email as well.
      Signed-off-by: default avatarSonic Zhang <sonic.zhang@analog.com>
      Cc: Michael Hennerich <michael.hennerich@analog.com>
      Cc: Lars-Peter Clausen <lars@metafoo.de>
      Cc: Mike Frysinger <vapier@gentoo.org>
      Cc: Steven Miao <realmz6@gmail.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      a4edbc10
    • Ard Biesheuvel's avatar
    • Dan Williams's avatar
      dma-debug: fix overlap detection · 59f2e7df
      Dan Williams authored
      Commit 0abdd7a8 ("dma-debug: introduce debug_dma_assert_idle()") was
      reworked to expand the overlap counter to the full range expressable by
      3 tag bits, but it has a thinko in treating the overlap counter as a
      pure reference count for the entry.
      
      Instead of deleting when the reference-count drops to zero, we need to
      delete when the overlap-count drops below zero.  Also, when detecting
      overflow we can just test the overlap-count > MAX rather than applying
      special meaning to 0.
      
      Regression report available here:
      http://marc.info/?l=linux-netdev&m=139073373932386&w=2
      
      This patch, now tested on the original net_dma case, sees the expected
      handful of reports before the eventual data corruption occurs.
      Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
      Reported-by: default avatarSander Eikelenboom <linux@eikelenboom.it>
      Cc: Francois Romieu <romieu@fr.zoreil.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      59f2e7df
    • Yinghai Lu's avatar
      memblock: add limit checking to memblock_virt_alloc · f544e14f
      Yinghai Lu authored
      In original bootmem wrapper for memblock, we have limit checking.
      
      Add it to memblock_virt_alloc, to address arm and x86 booting crash.
      Signed-off-by: default avatarYinghai Lu <yinghai@kernel.org>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Reported-by: default avatarKevin Hilman <khilman@linaro.org>
      Tested-by: default avatarKevin Hilman <khilman@linaro.org>
      Reported-by: default avatarOlof Johansson <olof@lixom.net>
      Tested-by: default avatarOlof Johansson <olof@lixom.net>
      Reported-by: default avatarKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Tested-by: default avatarKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Cc: Dave Hansen <dave.hansen@intel.com>
      Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
      Cc: "Strashko, Grygorii" <grygorii.strashko@ti.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      f544e14f
    • Mark Rutland's avatar
      mm/readahead.c: fix do_readahead() for no readpage(s) · 58d5640e
      Mark Rutland authored
      Commit 63d0f0a3 ("mm/readahead.c:do_readhead(): don't check for
      ->readpage") unintentionally made do_readahead return 0 for all valid
      files regardless of whether readahead was supported, rather than the
      expected -EINVAL.  This gets forwarded on to userspace, and results in
      sys_readahead appearing to succeed in cases that don't make sense (e.g.
      when called on pipes or sockets).  This issue is detected by the LTP
      readahead01 testcase.
      
      As the exact return value of force_page_cache_readahead is currently
      never used, we can simplify it to return only 0 or -EINVAL (when
      readpage or readpages is missing).  With that in place we can simply
      forward on the return value of force_page_cache_readahead in
      do_readahead.
      
      This patch performs said change, restoring the expected semantics.
      Signed-off-by: default avatarMark Rutland <mark.rutland@arm.com>
      Acked-by: default avatarKirill A. Shutemov <kirill.shutemov@linux.intel.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      58d5640e
    • Dave Hansen's avatar
      mm/slub.c: do not VM_BUG_ON_PAGE() for temporary on-stack pages · a0132ac0
      Dave Hansen authored
      Commit 309381fe ("mm: dump page when hitting a VM_BUG_ON using
      VM_BUG_ON_PAGE") added a bunch of VM_BUG_ON_PAGE() calls.
      
      But, most of the ones in the slub code are for _temporary_ 'struct
      page's which are declared on the stack and likely have lots of gunk in
      them.  Dumping their contents out will just confuse folks looking at
      bad_page() output.  Plus, if we try to page_to_pfn() on them or
      soemthing, we'll probably oops anyway.
      
      Turn them back in to VM_BUG_ON()s.
      Signed-off-by: default avatarDave Hansen <dave.hansen@linux.intel.com>
      Cc: Sasha Levin <sasha.levin@oracle.com>
      Cc: "Kirill A. Shutemov" <kirill@shutemov.name>
      Cc: Pekka Enberg <penberg@kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      a0132ac0
    • Dave Jones's avatar
      slab: fix wrong retval on kmem_cache_create_memcg error path · ba3253c7
      Dave Jones authored
      On kmem_cache_create_memcg() error path we set 'err', but leave 's' (the
      new cache ptr) undefined.  The latter can be NULL if we could not
      allocate the cache, or pointing to a freed area if we failed somewhere
      later while trying to initialize it.  Initially we checked 'err'
      immediately before exiting the function and returned NULL if it was set
      ignoring the value of 's':
      
          out_unlock:
              ...
              if (err) {
                  /* report error */
                  return NULL;
              }
              return s;
      
      Recently this check was, in fact, broken by commit f717eb3a ("slab:
      do not panic if we fail to create memcg cache"), which turned it to:
      
          out_unlock:
              ...
              if (err && !memcg) {
                  /* report error */
                  return NULL;
              }
              return s;
      
      As a result, if we are failing creating a cache for a memcg, we will
      skip the check and return 's' that can contain crap.  Obviously, commit
      f717eb3a intended not to return crap on error allocating a cache for
      a memcg, but only to remove the error reporting in this case, so the
      check should look like this:
      
          out_unlock:
              ...
              if (err) {
                  if (!memcg)
                      return NULL;
                  /* report error */
                  return NULL;
              }
              return s;
      
      [rientjes@google.com: despaghettification]
      [vdavydov@parallels.com: patch monkeying]
      Signed-off-by: default avatarDavid Rientjes <rientjes@google.com>
      Signed-off-by: default avatarVladimir Davydov <vdavydov@parallels.com>
      Signed-off-by: default avatarDave Jones <davej@redhat.com>
      Reported-by: default avatarDave Jones <davej@redhat.com>
      Acked-by: default avatarPekka Enberg <penberg@kernel.org>
      Cc: Christoph Lameter <cl@linux.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      ba3253c7
    • Heiko Carstens's avatar
      s390/compat: change parameter types from unsigned long to compat_ulong_t · 49382d93
      Heiko Carstens authored
      Change parameter types of s390's compat ipc syscall from unsigned long
      to compat_ulong_t to enforce zero extension of these parameters.
      
      This is not really a bug, since s390_ipc compat syscall is only a
      wrapper to the generic compat_sys_ipc() syscall, which performs correct
      zero and sign extension.
      
      This was introduced with commit 56e41d3c ("merge compat sys_ipc
      instances").
      Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      49382d93
    • Heiko Carstens's avatar
      fs/compat: fix lookup_dcookie() parameter handling · d8d14bd0
      Heiko Carstens authored
      Commit d5dc77bf ("consolidate compat lookup_dcookie()") coverted all
      architectures to the new compat_sys_lookup_dcookie() syscall.
      
      The "len" paramater of the new compat syscall must have the type
      compat_size_t in order to enforce zero extension for architectures where
      the ABI requires that the caller of a function performed zero and/or
      sign extension to 64 bit of all parameters.
      Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: <stable@vger.kernel.org>	[v3.10+]
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      d8d14bd0
    • Heiko Carstens's avatar
      fs/compat: fix parameter handling for compat readv/writev syscalls · dfd948e3
      Heiko Carstens authored
      We got a report that the pwritev syscall does not work correctly in
      compat mode on s390.
      
      It turned out that with commit 72ec3516 ("switch compat readv/writev
      variants to COMPAT_SYSCALL_DEFINE") we lost the zero extension of a
      couple of syscall parameters because the some parameter types haven't
      been converted from unsigned long to compat_ulong_t.
      
      This is needed for architectures where the ABI requires that the caller
      of a function performed zero and/or sign extension to 64 bit of all
      parameters.
      Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: <stable@vger.kernel.org>	[v3.10+]
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      dfd948e3
    • Andrew Morton's avatar
      mm/mempolicy.c: convert to pr_foo() · 4a404bea
      Andrew Morton authored
      A few printk(KERN_*'s have snuck in there.
      
      Cc: Mel Gorman <mgorman@suse.de>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      4a404bea
    • Mel Gorman's avatar
      mm: numa: initialise numa balancing after jump label initialisation · c297663c
      Mel Gorman authored
      The command line parsing takes place before jump labels are initialised
      which generates a warning if numa_balancing= is specified and
      CONFIG_JUMP_LABEL is set.
      
      On older kernels before commit c4b2c0c5 ("static_key: WARN on usage
      before jump_label_init was called") the kernel would have crashed.  This
      patch enables automatic numa balancing later in the initialisation
      process if numa_balancing= is specified.
      Signed-off-by: default avatarMel Gorman <mgorman@suse.de>
      Acked-by: default avatarRik van Riel <riel@redhat.com>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      c297663c
    • Johannes Weiner's avatar
      mm/page-writeback.c: do not count anon pages as dirtyable memory · a1c3bfb2
      Johannes Weiner authored
      The VM is currently heavily tuned to avoid swapping.  Whether that is
      good or bad is a separate discussion, but as long as the VM won't swap
      to make room for dirty cache, we can not consider anonymous pages when
      calculating the amount of dirtyable memory, the baseline to which
      dirty_background_ratio and dirty_ratio are applied.
      
      A simple workload that occupies a significant size (40+%, depending on
      memory layout, storage speeds etc.) of memory with anon/tmpfs pages and
      uses the remainder for a streaming writer demonstrates this problem.  In
      that case, the actual cache pages are a small fraction of what is
      considered dirtyable overall, which results in an relatively large
      portion of the cache pages to be dirtied.  As kswapd starts rotating
      these, random tasks enter direct reclaim and stall on IO.
      
      Only consider free pages and file pages dirtyable.
      Signed-off-by: default avatarJohannes Weiner <hannes@cmpxchg.org>
      Reported-by: default avatarTejun Heo <tj@kernel.org>
      Tested-by: default avatarTejun Heo <tj@kernel.org>
      Reviewed-by: default avatarRik van Riel <riel@redhat.com>
      Cc: Mel Gorman <mgorman@suse.de>
      Cc: Wu Fengguang <fengguang.wu@intel.com>
      Reviewed-by: default avatarMichal Hocko <mhocko@suse.cz>
      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>
      a1c3bfb2
    • Johannes Weiner's avatar
      mm/page-writeback.c: fix dirty_balance_reserve subtraction from dirtyable memory · a804552b
      Johannes Weiner authored
      Tejun reported stuttering and latency spikes on a system where random
      tasks would enter direct reclaim and get stuck on dirty pages.  Around
      50% of memory was occupied by tmpfs backed by an SSD, and another disk
      (rotating) was reading and writing at max speed to shrink a partition.
      
      : The problem was pretty ridiculous.  It's a 8gig machine w/ one ssd and 10k
      : rpm harddrive and I could reliably reproduce constant stuttering every
      : several seconds for as long as buffered IO was going on on the hard drive
      : either with tmpfs occupying somewhere above 4gig or a test program which
      : allocates about the same amount of anon memory.  Although swap usage was
      : zero, turning off swap also made the problem go away too.
      :
      : The trigger conditions seem quite plausible - high anon memory usage w/
      : heavy buffered IO and swap configured - and it's highly likely that this
      : is happening in the wild too.  (this can happen with copying large files
      : to usb sticks too, right?)
      
      This patch (of 2):
      
      The dirty_balance_reserve is an approximation of the fraction of free
      pages that the page allocator does not make available for page cache
      allocations.  As a result, it has to be taken into account when
      calculating the amount of "dirtyable memory", the baseline to which
      dirty_background_ratio and dirty_ratio are applied.
      
      However, currently the reserve is subtracted from the sum of free and
      reclaimable pages, which is non-sensical and leads to erroneous results
      when the system is dominated by unreclaimable pages and the
      dirty_balance_reserve is bigger than free+reclaimable.  In that case, at
      least the already allocated cache should be considered dirtyable.
      
      Fix the calculation by subtracting the reserve from the amount of free
      pages, then adding the reclaimable pages on top.
      
      [akpm@linux-foundation.org: fix CONFIG_HIGHMEM build]
      Signed-off-by: default avatarJohannes Weiner <hannes@cmpxchg.org>
      Reported-by: default avatarTejun Heo <tj@kernel.org>
      Tested-by: default avatarTejun Heo <tj@kernel.org>
      Reviewed-by: default avatarRik van Riel <riel@redhat.com>
      Cc: Mel Gorman <mgorman@suse.de>
      Cc: Wu Fengguang <fengguang.wu@intel.com>
      Reviewed-by: default avatarMichal Hocko <mhocko@suse.cz>
      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>
      a804552b
    • Aaron Tomlin's avatar
      mm: document improved handling of swappiness==0 · 8582cb96
      Aaron Tomlin authored
      Prior to commit fe35004f ("mm: avoid swapping out with
      swappiness==0") setting swappiness to 0, reclaim code could still evict
      recently used user anonymous memory to swap even though there is a
      significant amount of RAM used for page cache.
      
      The behaviour of setting swappiness to 0 has since changed.  When set,
      the reclaim code does not initiate swap until the amount of free pages
      and file-backed pages, is less than the high water mark in a zone.
      
      Let's update the documentation to reflect this.
      
      [akpm@linux-foundation.org: remove comma, per Randy]
      Signed-off-by: default avatarAaron Tomlin <atomlin@redhat.com>
      Acked-by: default avatarRik van Riel <riel@redhat.com>
      Acked-by: default avatarBryn M. Reeves <bmr@redhat.com>
      Cc: Satoru Moriya <satoru.moriya@hds.com>
      Cc: Randy Dunlap <rdunlap@infradead.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      8582cb96
    • Lad, Prabhakar's avatar
      lib/genalloc.c: add check gen_pool_dma_alloc() if dma pointer is not NULL · 0368dfd0
      Lad, Prabhakar authored
      In the gen_pool_dma_alloc() the dma pointer can be NULL and while
      assigning gen_pool_virt_to_phys(pool, vaddr) to dma caused the following
      crash on da850 evm:
      
         Unable to handle kernel NULL pointer dereference at virtual address 00000000
         Internal error: Oops: 805 [#1] PREEMPT ARM
         Modules linked in:
         CPU: 0 PID: 1 Comm: swapper Tainted: G        W    3.13.0-rc1-00001-g0609e45-dirty #5
         task: c4830000 ti: c4832000 task.ti: c4832000
         PC is at gen_pool_dma_alloc+0x30/0x3c
         LR is at gen_pool_virt_to_phys+0x74/0x80
         Process swapper, call trace:
           gen_pool_dma_alloc+0x30/0x3c
           davinci_pm_probe+0x40/0xa8
           platform_drv_probe+0x1c/0x4c
           driver_probe_device+0x98/0x22c
           __driver_attach+0x8c/0x90
           bus_for_each_dev+0x6c/0x8c
           bus_add_driver+0x124/0x1d4
           driver_register+0x78/0xf8
           platform_driver_probe+0x20/0xa4
           davinci_init_late+0xc/0x14
           init_machine_late+0x1c/0x28
           do_one_initcall+0x34/0x15c
           kernel_init_freeable+0xe4/0x1ac
           kernel_init+0x8/0xec
      
      This patch fixes the above.
      
      [akpm@linux-foundation.org: update kerneldoc]
      Signed-off-by: default avatarLad, Prabhakar <prabhakar.csengg@gmail.com>
      Cc: Philipp Zabel <p.zabel@pengutronix.de>
      Cc: Nicolin Chen <b42378@freescale.com>
      Cc: Joe Perches <joe@perches.com>
      Cc: Sachin Kamat <sachin.kamat@linaro.org>
      Cc: <stable@vger.kernel.org>	[3.13.x]
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      0368dfd0
    • Linus Torvalds's avatar
      Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs · 1ecd7450
      Linus Torvalds authored
      Pull fanotify use-after-free fixes from Jan Kara:
       "Three fixes for the fanotify use after free problems guys were
        reporting.
      
        I have ended up with different lifetime rules for struct
        fanotify_event_info depending on whether it is for permission event or
        normal event which isn't ideal.  My plan is to split these into two
        different structures (as permission events need larger struct anyway)
        which will make the rules trivial again.  But that can wait for later
        I guess (but I can add the patch to the pile if you want), now I
        wanted to make -rc1 boot for these guys"
      
      [ "These guys" being Jiri Kosina and Dave Jones that reported the slab
        corruption issues due to incorrect object lifetimes ]
      
      * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs:
        fanotify: Fix use after free for permission events
        fsnotify: Do not return merged event from fsnotify_add_notify_event()
        fanotify: Fix use after free in mask checking
      1ecd7450
    • Sage Weil's avatar
      ceph: fix posix ACL hooks · 72466d0b
      Sage Weil authored
      The merge of commit 7221fe4c ("ceph: add acl for cephfs") raced with
      upstream changes in the generic POSIX ACL code (eg commit 2aeccbe9
      "fs: add generic xattr_acl handlers" and others).
      
      Some of the fallout was fixed in commit 4db658ea ("ceph: Fix up after
      semantic merge conflict"), but it was incomplete: the set_acl
      inode_operation wasn't getting set, and the prototype needed to be
      adjusted a bit (it doesn't take a dentry anymore).
      Signed-off-by: default avatarSage Weil <sage@inktank.com>
      Signed-off-by: default avatarIlya Dryomov <ilya.dryomov@inktank.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      72466d0b
  2. 29 Jan, 2014 16 commits
    • Jan Kara's avatar
      fanotify: Fix use after free for permission events · 85816794
      Jan Kara authored
      Currently struct fanotify_event_info has been destroyed immediately
      after reporting its contents to userspace. However that is wrong for
      permission events because those need to stay around until userspace
      provides response which is filled back in fanotify_event_info. So change
      to code to free permission events only after we have got the response
      from userspace.
      Reported-and-tested-by: default avatarJiri Kosina <jkosina@suse.cz>
      Reported-and-tested-by: default avatarDave Jones <davej@fedoraproject.org>
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      85816794
    • Jan Kara's avatar
      fsnotify: Do not return merged event from fsnotify_add_notify_event() · 83c0e1b4
      Jan Kara authored
      The event returned from fsnotify_add_notify_event() cannot ever be used
      safely as the event may be freed by the time the function returns (after
      dropping notification_mutex). So change the prototype to just return
      whether the event was added or merged into some existing event.
      Reported-and-tested-by: default avatarJiri Kosina <jkosina@suse.cz>
      Reported-and-tested-by: default avatarDave Jones <davej@fedoraproject.org>
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      83c0e1b4
    • Jan Kara's avatar
      fanotify: Fix use after free in mask checking · 13116dfd
      Jan Kara authored
      We cannot use the event structure returned from
      fsnotify_add_notify_event() because that event can be freed by the time
      that function returns. Use the mask argument passed into the event
      handler directly instead. This also fixes a possible problem when we
      could unnecessarily wait for permission response for a normal fanotify
      event which got merged with a permission event.
      
      We also disallow merging of permission event with any other event so
      that we know the permission event which we just created is the one on
      which we should wait for permission response.
      Reported-and-tested-by: default avatarJiri Kosina <jkosina@suse.cz>
      Reported-and-tested-by: default avatarDave Jones <davej@fedoraproject.org>
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      13116dfd
    • David S. Miller's avatar
    • Eugene Crosser's avatar
      qeth: fix build of s390 allmodconfig · c044dc21
      Eugene Crosser authored
      commit 949efd1c "qeth: bridgeport support - basic control" broke
      s390 allmodconfig. This patch fixes this by eliminating one of the
      cross-module calls, and by making two other calls via function
      pointers in the qeth_discipline structure.
      Signed-off-by: default avatarEugene Crosser <Eugene.Crosser@ru.ibm.com>
      Signed-off-by: default avatarFrank Blaschka <frank.blaschka@de.ibm.com>
      Reported-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c044dc21
    • Ding Tianhong's avatar
      bonding: fix locking in bond_loadbalance_arp_mon() · 6fde8f03
      Ding Tianhong authored
      The commit 1d3ee88a
      (bonding: add netlink attributes to slave link dev)
      has add rtmsg_ifinfo() in bond_set_active_slave() and
      bond_set_backup_slave(), so the two function need to
      called in RTNL lock, but bond_loadbalance_arp_mon()
      only calling these functions in RCU, warning message
      will occurs.
      
      fix this by add a new function bond_slave_state_change(),
      which will reset the slave's state after slave link check,
      so remove the bond_set_xxx_slave() from the cycle and only
      record the slave_state_changed, this will call the new
      function to set all slaves to new state in RTNL later.
      
      Cc: Jay Vosburgh <fubar@us.ibm.com>
      Cc: Veaceslav Falico <vfalico@redhat.com>
      Cc: Andy Gospodarek <andy@greyhouse.net>
      Signed-off-by: default avatarDing Tianhong <dingtianhong@huawei.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6fde8f03
    • Masatake YAMATO's avatar
      tun: add device name(iff) field to proc fdinfo entry · 93e14b6d
      Masatake YAMATO authored
      A file descriptor opened for /dev/net/tun and a tun device are
      connected with ioctl.  Though understanding the connection is
      important for trouble shooting, no way is given to a user to know
      the connected device for a given file descriptor at userland.
      
      This patch adds a new fdinfo field for the device name connected to
      a file descriptor opened for /dev/net/tun.
      
      Here is an example of the field:
      
          # lsof | grep tun
          qemu-syst 4565         qemu   25u      CHR             10,200       0t138      12921 /dev/net/tun
          ...
      
          # cat /proc/4565/fdinfo/25
          pos:	138
          flags:	0104002
          iff:	vnet0
      
          # ip link show dev vnet0
          8: vnet0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 ...
      
      changelog:
      
          v2: indent iff just like the other fdinfo fields are.
          v3: remove unused variable.
              Both are suggested by David Miller <davem@davemloft.net>.
      Signed-off-by: default avatarMasatake YAMATO <yamato@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      93e14b6d
    • David S. Miller's avatar
      Merge branch 'DT' · 52efcea5
      David S. Miller authored
      Sergei Shtylyov says:
      
      ====================
      DT: net: davinci_emac: couple more properties actually optional
      
         Though described as required, couple more properties in the DaVinci EMAC
      binding are actually optional, as the driver will happily function without them.
      The patchset is against DaveM's 'net.git' tree this time.
      
      [1/2] DT: net: davinci_emac: "ti,davinci-rmii-en" property is actually optional
      [2/2] DT: net: davinci_emac: "ti,davinci-no-bd-ram" property is actually optional
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      52efcea5
    • Sergei Shtylyov's avatar
      DT: net: davinci_emac: "ti, davinci-no-bd-ram" property is actually optional · 589dcb8a
      Sergei Shtylyov authored
      The "ti,davinci-no-bd-ram" property for the DaVinci EMAC binding simply can't be
      required one, as it's boolean (which means it's absent if false).
      
      While at it, document the property better...
      Signed-off-by: default avatarSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      589dcb8a
    • Sergei Shtylyov's avatar
      DT: net: davinci_emac: "ti, davinci-rmii-en" property is actually optional · 731ff244
      Sergei Shtylyov authored
      Though described as required, the "ti,davinci-rmii-en" property for the DaVinci
      EMAC binding seems actually optional, as the driver should happily work without
      it; the property is not specified either  in the example device node or in the
      actual EMAC device node for DA850 device tree, only AM3517 one.
      
      While at it, document the property better...
      Signed-off-by: default avatarSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      731ff244
    • Paul Gortmaker's avatar
      sparc: don't use module_init in non-modular pci.c code · 1b925b57
      Paul Gortmaker authored
      The pci.o is built for SPARC64_PCI -- which is bool, and hence
      this code is either present or absent.  It will never be modular,
      so using module_init as an alias for __initcall can be somewhat
      misleading.
      
      Fix this up now, so that we can relocate module_init from
      init.h into module.h in the future.  If we don't do this, we'd
      have to add module.h to obviously non-modular code, and that
      would be a worse thing.
      
      Note that direct use of __initcall is discouraged, vs. one
      of the priority categorized subgroups.  As __initcall gets
      mapped onto device_initcall, our use of device_initcall
      directly in this change means that the runtime impact is
      zero -- it will remain at level 6 in initcall ordering.
      Signed-off-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1b925b57
    • Paul Gortmaker's avatar
      sparc: delete non-required instances of include <linux/init.h> · 8b2abcbc
      Paul Gortmaker authored
      None of these files are actually using any __init type directives
      and hence don't need to include <linux/init.h>.  Most are just a
      left over from __devinit and __cpuinit removal, or simply due to
      code getting copied from one driver to the next.
      Signed-off-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8b2abcbc
    • Rashika Kheria's avatar
      drivers: ide: Include appropriate header file in ide-pio-blacklist.c · 61eae5bb
      Rashika Kheria authored
      Include appropriate header file include/linux/ide.h in file
      ide-pio-blacklist.c because function ide_scan_pio_blacklist() has it's
      prototype declaration in include/linux/ide.h.
      
      This eliminates the following warning in ide-pio-blacklist.c:
      drivers/ide/ide-pio-blacklist.c:85:5: warning: no previous prototype for ‘ide_scan_pio_blacklist’ [-Wmissing-prototypes]
      Signed-off-by: default avatarRashika Kheria <rashika.kheria@gmail.com>
      Reviewed-by: default avatarJosh Triplett <josh@joshtriplett.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      61eae5bb
    • Rashika Kheria's avatar
      drivers: ide: Include appropriate header file in ide-cd_verbose.c · dfea4aa2
      Rashika Kheria authored
      Include appropriate header file ide-cd.h in ide-cd_verbose.c because
      function ide_cd_log_error() has its prototype declaration in ide-cd.h.
      Also, include linux/ide.h because it contains certain declarations
      necessary for including ide-cd.h.
      
      This eliminates the following warnings in ide-cd_verbose.c:
      drivers/ide/ide-cd_verbose.c:251:6: warning: no previous prototype for ‘ide_cd_log_error’ [-Wmissing-prototypes]
      Signed-off-by: default avatarRashika Kheria <rashika.kheria@gmail.com>
      Reviewed-by: default avatarJosh Triplett <josh@joshtriplett.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      dfea4aa2
    • Linus Torvalds's avatar
      Merge tag 'for-linus-20140127' of git://git.infradead.org/linux-mtd · 0e47c969
      Linus Torvalds authored
      Pull MTD updates from Brian Norris:
       - Add me (Brian Norris) as an additional MTD maintainer (it'd be nice to get
         David's "ack" for this; I'm sure he approves, but he's been pretty silent
         lately)
       - Add Ezequiel Garcie as maintainer for the pxa3xx NAND driver
       - Last (?) round of pxa3xx improvements for supporting Armada 370/XP
       - Typical churn in driver boilerplate (OOM messages, printk()'s, devm_*, etc.)
       - Quad read mode support for SPI NOR driver (m25p80)
       - Update Davinci NAND driver to prepare for use on new platforms
       - Begin to kill off NAND_MAX_{PAGE,OOB}SIZE macros; more work is pending
       - Miscellaneous NAND device support (new IDs)
       - Add READ RETRY support for Micron MLC NAND
       - Support new GPMI NAND ECC layout device-tree binding
       - Avoid mapping stack/vmalloc() memory for GPMI NAND DMA
      
      * tag 'for-linus-20140127' of git://git.infradead.org/linux-mtd: (151 commits)
        mtd: gpmi: add sanity check when mapping DMA for read_buf/write_buf
        mtd: gpmi: allocate a proper buffer for non ECC read/write
        mtd: m25p80: Set rx_nbits for Quad SPI transfers
        mtd: m25p80: Enable Quad SPI read transfers for s25fl512s
        mtd: s3c2410: Merge plat/regs-nand.h into s3c2410.c
        mtd: mtdram: add missing 'const'
        mtd: m25p80: assign default read command
        mtd: nuc900_nand: remove redundant return value check of platform_get_resource()
        mtd: plat_nand: remove redundant return value check of platform_get_resource()
        mtd: nand: add Intel manufacturer ID
        mtd: nand: add SanDisk manufacturer ID
        mtd: nand: add support for Samsung K9LCG08U0B
        mtd: nand: pxa3xx: Add support for 2048 bytes page size devices
        mtd: m25p80: Use OPCODE_QUAD_READ_4B for 4-byte addressing
        mtd: nand: don't use {read,write}_buf for 8-bit transfers
        mtd: nand: use __packed shorthand
        mtd: nand: support Micron READ RETRY
        mtd: nand: add generic READ RETRY support
        mtd: nand: add ONFI vendor block for Micron
        mtd: nand: localize ECC failures per page
        ...
      0e47c969
    • Linus Torvalds's avatar
      Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds · 268943fb
      Linus Torvalds authored
      Pull LED subsystem update from Bryan Wu:
       "Basically this cycle is mostly cleanup for LED subsystem"
      
      * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds:
        leds: s3c24xx: Remove hardware.h inclusion
        leds: replace list_for_each with list_for_each_entry
        leds: kirkwood: Cleanup in header files
        leds: pwm: Remove a warning on non-DT platforms
        leds: leds-pwm: fix duty time overflow.
        leds: leds-mc13783: Remove unneeded mc13xxx_{un}lock
        leds: leds-mc13783: Remove duplicate field in platform data
        drivers: leds: leds-tca6507: check CONFIG_GPIOLIB whether defined for 'gpio_base'
        leds: lp5523: Support LED MUX configuration on running a pattern
        leds: lp5521/5523: Fix multiple engine usage bug
        LEDS: tca6507 - fix up some comments.
        LEDS: tca6507: add device-tree support for GPIO configuration.
        LEDS: tca6507 - fix bugs in parsing of device-tree configuration.
      268943fb