1. 15 Mar, 2013 3 commits
  2. 14 Mar, 2013 3 commits
    • Linus Torvalds's avatar
      Merge branch 'rcu/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu · f4846e52
      Linus Torvalds authored
      Pull fix for hlist_entry_safe() regression from Paul McKenney:
       "This contains a single commit that fixes a regression in
        hlist_entry_safe().  This macro references its argument twice, which
        can cause NULL-pointer errors.  This commit applies a gcc statement
        expression, creating a temporary variable to avoid the double
        reference.  This has been posted to LKML at
      
          https://lkml.org/lkml/2013/3/9/75.
      
        Kudos to CAI Qian, whose testing uncovered this, to Eric Dumazet, who
        spotted root cause, and to Li Zefan, who tested this commit."
      
      * 'rcu/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu:
        list: Fix double fetch of pointer in hlist_entry_safe()
      f4846e52
    • Paul E. McKenney's avatar
      list: Fix double fetch of pointer in hlist_entry_safe() · f65846a1
      Paul E. McKenney authored
      The current version of hlist_entry_safe() fetches the pointer twice,
      once to test for NULL and the other to compute the offset back to the
      enclosing structure.  This is OK for normal lock-based use because in
      that case, the pointer cannot change.  However, when the pointer is
      protected by RCU (as in "rcu_dereference(p)"), then the pointer can
      change at any time.  This use case can result in the following sequence
      of events:
      
      1.	CPU 0 invokes hlist_entry_safe(), fetches the RCU-protected
      	pointer as sees that it is non-NULL.
      
      2.	CPU 1 invokes hlist_del_rcu(), deleting the entry that CPU 0
      	just fetched a pointer to.  Because this is the last entry
      	in the list, the pointer fetched by CPU 0 is now NULL.
      
      3.	CPU 0 refetches the pointer, obtains NULL, and then gets a
      	NULL-pointer crash.
      
      This commit therefore applies gcc's "({ })" statement expression to
      create a temporary variable so that the specified pointer is fetched
      only once, avoiding the above sequence of events.  Please note that
      it is the caller's responsibility to use rcu_dereference() as needed.
      This allows RCU-protected uses to work correctly without imposing
      any additional overhead on the non-RCU case.
      
      Many thanks to Eric Dumazet for spotting root cause!
      Reported-by: default avatarCAI Qian <caiqian@redhat.com>
      Reported-by: default avatarEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      Tested-by: default avatarLi Zefan <lizefan@huawei.com>
      f65846a1
    • Linus Torvalds's avatar
      Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs · 40e4591d
      Linus Torvalds authored
      Pull ext2, ext3, reiserfs, quota fixes from Jan Kara:
       "A fix for regression in ext2, and a format string issue in ext3.  The
        rest isn't too serious."
      
      * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs:
        ext2: Fix BUG_ON in evict() on inode deletion
        reiserfs: Use kstrdup instead of kmalloc/strcpy
        ext3: Fix format string issues
        quota: add missing use of dq_data_lock in __dquot_initialize
      40e4591d
  3. 13 Mar, 2013 33 commits
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace · aea8b5d1
      Linus Torvalds authored
      Pull namespace bugfixes from Eric Biederman:
       "This tree includes a partial revert for "fs: Limit sys_mount to only
        request filesystem modules." When I added the new style module aliases
        to the filesystems I deleted the old ones.  A bad move.  It turns out
        that distributions like Arch linux use module aliases when
        constructing ramdisks.  Which meant ultimately that an ext3 filesystem
        mounted with ext4 would not result in the ext4 module being put into
        the ramdisk.
      
        The other change in this tree adds a handful of filesystem module
        alias I simply failed to add the first time.  Which inconvinienced a
        few folks using cifs.
      
        I don't want to inconvinience folks any longer than I have to so here
        are these trivial fixes."
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace:
        fs: Readd the fs module aliases.
        fs: Limit sys_mount to only request filesystem modules. (Part 3)
      aea8b5d1
    • Linus Torvalds's avatar
      Merge branch 'akpm' (fixes from Andrew) · 842d223f
      Linus Torvalds authored
      Merge misc fixes from Andrew Morton:
      
       - A bunch of fixes
      
       - Finish off the idr API conversions before someone starts to use the
         old interfaces again.
      
      * emailed patches from Andrew Morton <akpm@linux-foundation.org>:
        idr: idr_alloc() shouldn't trigger lowmem warning when preloaded
        UAPI: fix endianness conditionals in M32R's asm/stat.h
        UAPI: fix endianness conditionals in linux/raid/md_p.h
        UAPI: fix endianness conditionals in linux/acct.h
        UAPI: fix endianness conditionals in linux/aio_abi.h
        decompressors: fix typo "POWERPC"
        mm/fremap.c: fix oops on error path
        idr: deprecate idr_pre_get() and idr_get_new[_above]()
        tidspbridge: convert to idr_alloc()
        zcache: convert to idr_alloc()
        mlx4: remove leftover idr_pre_get() call
        workqueue: convert to idr_alloc()
        nfsd: convert to idr_alloc()
        nfsd: remove unused get_new_stid()
        kernel/signal.c: use __ARCH_HAS_SA_RESTORER instead of SA_RESTORER
        signal: always clear sa_restorer on execve
        mm: remove_memory(): fix end_pfn setting
        include/linux/res_counter.h needs errno.h
      842d223f
    • Tejun Heo's avatar
      idr: idr_alloc() shouldn't trigger lowmem warning when preloaded · 59bfbcf0
      Tejun Heo authored
      GFP_NOIO is often used for idr_alloc() inside preloaded section as the
      allocation mask doesn't really matter.  If the idr tree needs to be
      expanded, idr_alloc() first tries to allocate using the specified
      allocation mask and if it fails falls back to the preloaded buffer.  This
      order prevent non-preloading idr_alloc() users from taking advantage of
      preloading ones by using preload buffer without filling it shifting the
      burden of allocation to the preload users.
      
      Unfortunately, this allowed/expected-to-fail kmem_cache allocation ends up
      generating spurious slab lowmem warning before succeeding the request from
      the preload buffer.
      
      This patch makes idr_layer_alloc() add __GFP_NOWARN to the first
      kmem_cache attempt and try kmem_cache again w/o __GFP_NOWARN after
      allocation from preload_buffer fails so that lowmem warning is generated
      if not suppressed by the original @gfp_mask.
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Reported-by: default avatarDavid Teigland <teigland@redhat.com>
      Tested-by: default avatarDavid Teigland <teigland@redhat.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      59bfbcf0
    • David Howells's avatar
      UAPI: fix endianness conditionals in M32R's asm/stat.h · 415586c9
      David Howells authored
      In the UAPI header files, __BIG_ENDIAN and __LITTLE_ENDIAN must be
      compared against __BYTE_ORDER in preprocessor conditionals where these are
      exposed to userspace (that is they're not inside __KERNEL__ conditionals).
      
      However, in the main kernel the norm is to check for
      "defined(__XXX_ENDIAN)" rather than comparing against __BYTE_ORDER and
      this has incorrectly leaked into the userspace headers.
      
      The definition of struct stat64 in M32R's asm/stat.h is wrong in this way.
       Note that userspace will likely interpret the field order incorrectly as
      the big-endian variant on little-endian machines - depending on header
      inclusion order.
      
      [!!!] NOTE [!!!]  This patch may adversely change the userspace API.  It might
      be better to fix the ordering of st_blocks and __pad4 in struct stat64.
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Cc: Hirokazu Takata <takata@linux-m32r.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      415586c9
    • David Howells's avatar
      UAPI: fix endianness conditionals in linux/raid/md_p.h · ca044f9a
      David Howells authored
      In the UAPI header files, __BIG_ENDIAN and __LITTLE_ENDIAN must be
      compared against __BYTE_ORDER in preprocessor conditionals where these are
      exposed to userspace (that is they're not inside __KERNEL__ conditionals).
      
      However, in the main kernel the norm is to check for
      "defined(__XXX_ENDIAN)" rather than comparing against __BYTE_ORDER and
      this has incorrectly leaked into the userspace headers.
      
      The definition of struct mdp_superblock_s in linux/raid/md_p.h is wrong in
      this way.  Note that userspace will likely interpret the ordering of the
      fields incorrectly as the big-endian variant on a little-endian machines -
      depending on header inclusion order.
      
      [!!!] NOTE [!!!]  This patch may adversely change the userspace API.  It might
      be better to fix the ordering of events_hi, events_lo, cp_events_hi and
      cp_events_lo in struct mdp_superblock_s / typedef mdp_super_t.
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Acked-by: default avatarNeilBrown <neilb@suse.de>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      ca044f9a
    • David Howells's avatar
      UAPI: fix endianness conditionals in linux/acct.h · 29ba06b9
      David Howells authored
      In the UAPI header files, __BIG_ENDIAN and __LITTLE_ENDIAN must be
      compared against __BYTE_ORDER in preprocessor conditionals where these are
      exposed to userspace (that is they're not inside __KERNEL__ conditionals).
      
      However, in the main kernel the norm is to check for
      "defined(__XXX_ENDIAN)" rather than comparing against __BYTE_ORDER and
      this has incorrectly leaked into the userspace headers.
      
      The definition of ACCT_BYTEORDER in linux/acct.h is wrong in this way.
      Note that userspace will likely interpret this incorrectly as the
      big-endian variant on little-endian machines - depending on header
      inclusion order.
      
      [!!!] NOTE [!!!]  This patch may adversely change the userspace API.  It might
      be better to fix the value of ACCT_BYTEORDER.
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      29ba06b9
    • David Howells's avatar
      UAPI: fix endianness conditionals in linux/aio_abi.h · 51b154ed
      David Howells authored
      In the UAPI header files, __BIG_ENDIAN and __LITTLE_ENDIAN must be
      compared against __BYTE_ORDER in preprocessor conditionals where these are
      exposed to userspace (that is they're not inside __KERNEL__ conditionals).
      
      However, in the main kernel the norm is to check for
      "defined(__XXX_ENDIAN)" rather than comparing against __BYTE_ORDER and
      this has incorrectly leaked into the userspace headers.
      
      The definition of PADDED() in linux/aio_abi.h is wrong in this way.  Note
      that userspace will likely interpret this and thus the order of fields in
      struct iocb incorrectly as the little-endian variant on big-endian
      machines - depending on header inclusion order.
      
      [!!!] NOTE [!!!]  This patch may adversely change the userspace API.  It might
      be better to fix the ordering of aio_key and aio_reserved1 in struct iocb.
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Acked-by: default avatarBenjamin LaHaise <bcrl@kvack.org>
      Acked-by: default avatarJeff Moyer <jmoyer@redhat.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      51b154ed
    • Paul Bolle's avatar
      decompressors: fix typo "POWERPC" · 97da55fc
      Paul Bolle authored
      Commit 5dc49c75 ("decompressors: make the default XZ_DEC_* config
      match the selected architecture") added
      
      	default y if POWERPC
      
      to lib/xz/Kconfig.  But there is no Kconfig symbol POWERPC.  The most
      general Kconfig symbol for the powerpc architecture is PPC.  So let's
      use that.
      Signed-off-by: default avatarPaul Bolle <pebolle@tiscali.nl>
      Cc: Florian Fainelli <florian@openwrt.org>
      Cc: Lasse Collin <lasse.collin@tukaani.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      97da55fc
    • Andrew Morton's avatar
      mm/fremap.c: fix oops on error path · 6d7825b1
      Andrew Morton authored
      If find_vma() fails, sys_remap_file_pages() will dereference `vma', which
      contains NULL.  Fix it by checking the pointer.
      
      (We could alternatively check for err==0, but this seems more direct)
      
      (The vm_flags change is to squish a bogus used-uninitialised warning
      without adding extra code).
      Reported-by: default avatarTommi Rantala <tt.rantala@gmail.com>
      Cc: Michel Lespinasse <walken@google.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      6d7825b1
    • Tejun Heo's avatar
      idr: deprecate idr_pre_get() and idr_get_new[_above]() · c8615d37
      Tejun Heo authored
      Now that all in-kernel users are converted to ues the new alloc
      interface, mark the old interface deprecated.  We should be able to
      remove these in a few releases.
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      c8615d37
    • Tejun Heo's avatar
      tidspbridge: convert to idr_alloc() · 8e467e85
      Tejun Heo authored
      idr_get_new*() and friends are about to be deprecated.  Convert to the
      new idr_alloc() interface.
      
      There are some peculiarities and possible bugs in the converted
      functions.  This patch preserves those.
      
      * drv_insert_node_res_element() returns -ENOMEM on alloc failure,
        -EFAULT if id space is exhausted.  -EFAULT is at best misleading.
      
      * drv_proc_insert_strm_res_element() is even weirder.  It returns
        -EFAULT if kzalloc() fails, -ENOMEM if idr preloading fails and
        -EPERM if id space is exhausted.  What's going on here?
      
      * drv_proc_insert_strm_res_element() doesn't free *pstrm_res after
        failure.
      
      Only compile tested.
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Acked-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
      Cc: Rene Sapiens <rene.sapiens@ti.com>
      Cc: Armando Uribe <x0095078@ti.com>
      Cc: Omar Ramirez Luna <omar.ramirez@ti.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      8e467e85
    • Tejun Heo's avatar
      zcache: convert to idr_alloc() · a37c3010
      Tejun Heo authored
      idr_get_new*() and friends are about to be deprecated.  Convert to the
      new idr_alloc() interface.
      
      Only compile tested.
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Cc: Dan Magenheimer <dan.magenheimer@oracle.com>
      Acked-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      a37c3010
    • Tejun Heo's avatar
      mlx4: remove leftover idr_pre_get() call · 95e1b714
      Tejun Heo authored
      Commit 6a920060 ("IB/mlx4: convert to idr_alloc()") forgot to remove
      idr_pre_get() call in mlx4_ib_cm_paravirt_init().  It's unnecessary and
      idr_pre_get() will soon be deprecated.  Remove it.
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Cc: Jack Morgenstein <jackm@dev.mellanox.co.il>
      Cc: Or Gerlitz <ogerlitz@mellanox.com>
      Cc: Roland Dreier <roland@purestorage.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      95e1b714
    • Tejun Heo's avatar
      workqueue: convert to idr_alloc() · e68035fb
      Tejun Heo authored
      idr_get_new*() and friends are about to be deprecated.  Convert to the
      new idr_alloc() interface.
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      e68035fb
    • Tejun Heo's avatar
      nfsd: convert to idr_alloc() · ebd6c707
      Tejun Heo authored
      idr_get_new*() and friends are about to be deprecated.  Convert to the
      new idr_alloc() interface.
      
      Only compile-tested.
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Acked-by: default avatarJ. Bruce Fields <bfields@redhat.com>
      Tested-by: default avatarJ. Bruce Fields <bfields@redhat.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      ebd6c707
    • Tejun Heo's avatar
      nfsd: remove unused get_new_stid() · 801cb2d6
      Tejun Heo authored
      get_new_stid() is no longer used since commit 3abdb607 ("nfsd4:
      simplify idr allocation").  Remove it.
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Acked-by: default avatarJ. Bruce Fields <bfields@redhat.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      801cb2d6
    • Andrew Morton's avatar
      kernel/signal.c: use __ARCH_HAS_SA_RESTORER instead of SA_RESTORER · 522cff14
      Andrew Morton authored
      __ARCH_HAS_SA_RESTORER is the preferred conditional for use in 3.9 and
      later kernels, per Kees.
      
      Cc: Emese Revfy <re.emese@gmail.com>
      Cc: Emese Revfy <re.emese@gmail.com>
      Cc: PaX Team <pageexec@freemail.hu>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Cc: "Eric W. Biederman" <ebiederm@xmission.com>
      Cc: Serge Hallyn <serge.hallyn@canonical.com>
      Cc: Julien Tinnes <jln@google.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      522cff14
    • Kees Cook's avatar
      signal: always clear sa_restorer on execve · 2ca39528
      Kees Cook authored
      When the new signal handlers are set up, the location of sa_restorer is
      not cleared, leaking a parent process's address space location to
      children.  This allows for a potential bypass of the parent's ASLR by
      examining the sa_restorer value returned when calling sigaction().
      
      Based on what should be considered "secret" about addresses, it only
      matters across the exec not the fork (since the VMAs haven't changed
      until the exec).  But since exec sets SIG_DFL and keeps sa_restorer,
      this is where it should be fixed.
      
      Given the few uses of sa_restorer, a "set" function was not written
      since this would be the only use.  Instead, we use
      __ARCH_HAS_SA_RESTORER, as already done in other places.
      
      Example of the leak before applying this patch:
      
        $ cat /proc/$$/maps
        ...
        7fb9f3083000-7fb9f3238000 r-xp 00000000 fd:01 404469 .../libc-2.15.so
        ...
        $ ./leak
        ...
        7f278bc74000-7f278be29000 r-xp 00000000 fd:01 404469 .../libc-2.15.so
        ...
        1 0 (nil) 0x7fb9f30b94a0
        2 4000000 (nil) 0x7f278bcaa4a0
        3 4000000 (nil) 0x7f278bcaa4a0
        4 0 (nil) 0x7fb9f30b94a0
        ...
      
      [akpm@linux-foundation.org: use SA_RESTORER for backportability]
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      Reported-by: default avatarEmese Revfy <re.emese@gmail.com>
      Cc: Emese Revfy <re.emese@gmail.com>
      Cc: PaX Team <pageexec@freemail.hu>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Cc: "Eric W. Biederman" <ebiederm@xmission.com>
      Cc: Serge Hallyn <serge.hallyn@canonical.com>
      Cc: Julien Tinnes <jln@google.com>
      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>
      2ca39528
    • Toshi Kani's avatar
      mm: remove_memory(): fix end_pfn setting · f8749452
      Toshi Kani authored
      remove_memory() calls walk_memory_range() with [start_pfn, end_pfn), where
      end_pfn is exclusive in this range.  Therefore, end_pfn needs to be set to
      the next page of the end address.
      Signed-off-by: default avatarToshi Kani <toshi.kani@hp.com>
      Cc: Wen Congyang <wency@cn.fujitsu.com>
      Cc: Tang Chen <tangchen@cn.fujitsu.com>
      Cc: Kamezawa Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
      Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
      Cc: Jiang Liu <jiang.liu@huawei.com>
      Cc: Jianguo Wu <wujianguo@huawei.com>
      Cc: Lai Jiangshan <laijs@cn.fujitsu.com>
      Cc: Wu Jianguo <wujianguo@huawei.com>
      Cc: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      f8749452
    • Andrew Morton's avatar
      include/linux/res_counter.h needs errno.h · ebf47beb
      Andrew Morton authored
      alpha allmodconfig:
      
        In file included from mm/memcontrol.c:28:
        include/linux/res_counter.h: In function 'res_counter_set_limit':
        include/linux/res_counter.h:203: error: 'EBUSY' undeclared (first use in this function)
        include/linux/res_counter.h:203: error: (Each undeclared identifier is reported only once
        include/linux/res_counter.h:203: error: for each function it appears in.)
      
      Cc: Kamezawa Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
      Cc: Glauber Costa <glommer@parallels.com>
      Cc: Tejun Heo <tj@kernel.org>
      Cc: Frederic Weisbecker <fweisbec@redhat.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      ebf47beb
    • Linus Torvalds's avatar
      Merge tag 'usb-3.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb · ad8395e1
      Linus Torvalds authored
      Pull USB fixes from Greg Kroah-Hartman:
       "Here are a number of tiny USB fixes and new USB device ids for your
        3.9 tree.
      
        The "largest" one here is a revert of a usb-storage patch that turned
        out to be incorrect, breaking existing users, which is never a good
        thing.  Everything else is pretty simple and small"
      
      * tag 'usb-3.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (43 commits)
        USB: quatech2: only write to the tty if the port is open.
        qcserial: bind to DM/DIAG port on Gobi 1K devices
        USB: cdc-wdm: fix buffer overflow
        usb: serial: Add Rigblaster Advantage to device table
        qcaux: add Franklin U600
        usb: musb: core: fix possible build error with randconfig
        usb: cp210x new Vendor/Device IDs
        usb: gadget: pxa25x: fix disconnect reporting
        usb: dwc3: ep0: fix sparc64 build
        usb: c67x00 RetryCnt value in c67x00 TD should be 3
        usb: Correction to c67x00 TD data length mask
        usb: Makefile: fix drivers/usb/phy/ Makefile entry
        USB: added support for Cinterion's products AH6 and PLS8
        usb: gadget: fix omap_udc build errors
        USB: storage: fix Huawei mode switching regression
        USB: storage: in-kernel modeswitching is deprecated
        tools: usb: ffs-test: Fix build failure
        USB: option: add Huawei E5331
        usb: musb: omap2430: fix sparse warning
        usb: musb: omap2430: fix omap_musb_mailbox glue check again
        ...
      ad8395e1
    • Linus Torvalds's avatar
      Merge tag 'tty-3.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty · cad9d566
      Linus Torvalds authored
      Pull tty/serial fixes from Greg Kroah-Hartman:
       "Here are some tty/serial driver fixes for 3.9
      
        We finally mute the annoying WARN_ON that lots of people are hitting
        and it turns out isn't needed anymore.  Also add a few new device ids
        and a some other minor fixes."
      
      * tag 'tty-3.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
        tty: serial: fix typo "SERIAL_S3C2412"
        serial: 8250: Keep 8250.<xxxx> module options functional after driver rename
        tty: serial: fix typo "ARCH_S5P6450"
        tty/8250_pnp: serial port detection regression since v3.7
        serial: bcm63xx_uart: fix compilation after "TTY: switch tty_insert_flip_char"
        serial: 8250_pci: add support for another kind of NetMos Technology PCI 9835 Multi-I/O Controller
        Fix 4 port and add support for 8 port 'Unknown' PCI serial port cards
        tty/serial: Add support for Altera serial port
        tty: serial: vt8500: Unneccessary duplicated clock code removed
        tty: serial: mpc5xxx: fix PSC clock name bug
        TTY: disable debugging warning
      cad9d566
    • Linus Torvalds's avatar
      Merge tag 'staging-3.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging · 886e03be
      Linus Torvalds authored
      Pull staging tree fixes from Greg Kroah-Hartman:
       "Here are some drivers/staging and drivers/iio fixes for 3.9 (the two
        are still pretty intertwined, hence them coming both from my tree
        still.) Nothing major, just a few things that have been reported by
        users, all of these have been in linux-next for a while."
      
      * tag 'staging-3.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
        staging: comedi: dt9812: use CR_CHAN() for channel number
        staging/vt6656: Fix too large integer constant warning on 32-bit
        staging: comedi: drivers: usbduxsigma.c: fix DMA buffers on stack
        staging: imx/drm: request irq only after adding the crtc
        staging: comedi: drivers: usbduxfast.c: fix for DMA buffers on stack
        staging: comedi: drivers: usbdux.c: fix DMA buffers on stack
        staging: vt6656: Fix oops on resume from suspend.
        iio:common:st_sensors fixed all warning messages about uninitialized variables
        iio: Fix build error seen if IIO_TRIGGER is defined but IIO_BUFFER is not
        iio/imu: inv_mpu6050 depends on IIO_BUFFER
        iio:ad5064: Initialize register cache correctly
        iio:ad5064: Fix off by one in DAC value range check
        iio:ad5064: Fix address of the second channel for ad5065/ad5045/ad5025
      886e03be
    • Eric W. Biederman's avatar
      userns: Don't allow CLONE_NEWUSER | CLONE_FS · e66eded8
      Eric W. Biederman authored
      Don't allowing sharing the root directory with processes in a
      different user namespace.  There doesn't seem to be any point, and to
      allow it would require the overhead of putting a user namespace
      reference in fs_struct (for permission checks) and incrementing that
      reference count on practically every call to fork.
      
      So just perform the inexpensive test of forbidding sharing fs_struct
      acrosss processes in different user namespaces.  We already disallow
      other forms of threading when unsharing a user namespace so this
      should be no real burden in practice.
      
      This updates setns, clone, and unshare to disallow multiple user
      namespaces sharing an fs_struct.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatar"Eric W. Biederman" <ebiederm@xmission.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      e66eded8
    • Bill Pemberton's avatar
      USB: quatech2: only write to the tty if the port is open. · 27b351c5
      Bill Pemberton authored
      The commit 2e124b4a removed the checks
      that prevented qt2_process_read_urb() from trying to put chars into
      ttys that weren't actually opened.  This resulted in 'tty is NULL'
      warnings from flush_to_ldisc() when the device was used.
      
      The devices use just one read urb for all ports.  As a result
      qt2_process_read_urb() may be called with the current port set to a
      port number that has not been opened.  Add a check if the port is open
      before calling tty_flip_buffer_push().
      Signed-off-by: default avatarBill Pemberton <wfp5p@virginia.edu>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      27b351c5
    • Dan Williams's avatar
      qcserial: bind to DM/DIAG port on Gobi 1K devices · 3f8bc5e4
      Dan Williams authored
      Turns out we just need altsetting 1 and then we can talk to it.
      Signed-off-by: default avatarDan Williams <dcbw@redhat.com>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      3f8bc5e4
    • Jan Kara's avatar
      ext2: Fix BUG_ON in evict() on inode deletion · c288d296
      Jan Kara authored
      Commit 8e3dffc6 introduced a regression where deleting inode with
      large extended attributes leads to triggering
        BUG_ON(inode->i_state != (I_FREEING | I_CLEAR))
      in fs/inode.c:evict(). That happens because freeing of xattr block
      dirtied the inode and it happened after clear_inode() has been called.
      
      Fix the issue by moving removal of xattr block into ext2_evict_inode()
      before clear_inode() call close to a place where data blocks are
      truncated. That is also more logical place and removes surprising
      requirement that ext2_free_blocks() mustn't dirty the inode.
      Reported-by: default avatarTyler Hicks <tyhicks@canonical.com>
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      c288d296
    • Randy Dunlap's avatar
      futex: fix kernel-doc notation and spello · 6c23cbbd
      Randy Dunlap authored
      Fix kernel-doc warning in futex.c and convert 'Returns' to the new Return:
      kernel-doc notation format.
      
        Warning(kernel/futex.c:2286): Excess function parameter 'clockrt' description in 'futex_wait_requeue_pi'
      
      Fix one spello.
      Signed-off-by: default avatarRandy Dunlap <rdunlap@infradead.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      6c23cbbd
    • Randy Dunlap's avatar
      signals: fix new kernel-doc warnings · 20f22ab4
      Randy Dunlap authored
      Fix new kernel-doc warnings in kernel/signal.c:
      
        Warning(kernel/signal.c:2689): No description found for parameter 'uset'
        Warning(kernel/signal.c:2689): Excess function parameter 'set' description in 'sys_rt_sigpending'
      Signed-off-by: default avatarRandy Dunlap <rdunlap@infradead.org>
      Cc: Alexander Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      20f22ab4
    • Randy Dunlap's avatar
      idr: fix new kernel-doc warnings · 5857f70c
      Randy Dunlap authored
      Fix new kernel-doc warnings in idr:
      
        Warning(include/linux/idr.h:113): No description found for parameter 'idr'
        Warning(include/linux/idr.h:113): Excess function parameter 'idp' description in 'idr_find'
        Warning(lib/idr.c:232): Excess function parameter 'id' description in 'sub_alloc'
        Warning(lib/idr.c:232): Excess function parameter 'id' description in 'sub_alloc'
      Signed-off-by: default avatarRandy Dunlap <rdunlap@infradead.org>
      Acked-by: default avatarTejun Heo <tj@kernel.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      5857f70c
    • Linus Torvalds's avatar
      Merge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux · a3633f67
      Linus Torvalds authored
      Pull virtio rng buffix from Rusty Russell:
       "Simple virtio-rng fix."
      
      * tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux:
        virtio: rng: disallow multiple device registrations, fixes crashes
      a3633f67
    • Linus Torvalds's avatar
      Merge tag 'stable/for-linus-3.9-rc2-tag' of... · 7946844a
      Linus Torvalds authored
      Merge tag 'stable/for-linus-3.9-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen
      
      Pull Xen fixes from Konrad Rzeszutek Wilk:
       - Compile warnings and errors (one on x86, two on ARM)
       - WARNING in xen-pciback
       - Use the acpi_processor_get_performance_info instead of the 'register'
         version
      
      * tag 'stable/for-linus-3.9-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
        xen/acpi: remove redundant acpi/acpi_drivers.h include
        xen: arm: mandate EABI and use generic atomic operations.
        acpi: Export the acpi_processor_get_performance_info
        xen/pciback: Don't disable a PCI device that is already disabled.
      7946844a
    • Eric W. Biederman's avatar
      fs: Readd the fs module aliases. · fa7614dd
      Eric W. Biederman authored
      I had assumed that the only use of module aliases for filesystems
      prior to "fs: Limit sys_mount to only request filesystem modules."
      was in request_module.  It turns out I was wrong.  At least mkinitcpio
      in Arch linux uses these aliases.
      
      So readd the preexising aliases, to keep from breaking userspace.
      
      Userspace eventually will have to follow and use the same aliases the
      kernel does.  So at some point we may be delete these aliases without
      problems.  However that day is not today.
      Signed-off-by: default avatar"Eric W. Biederman" <ebiederm@xmission.com>
      fa7614dd
  4. 12 Mar, 2013 1 commit