1. 22 3月, 2013 8 次提交
  2. 21 3月, 2013 3 次提交
    • G
      Merge tag 'fixes-for-v3.9-rc4' of... · d93acbca
      Greg Kroah-Hartman 提交于
      Merge tag 'fixes-for-v3.9-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-linus
      
      Felipe writes:
      
      	usb: fixes for v3.9-rc4
      
      	udc-core learned that it shouldn't use invalid pointers
      	when unloading a gadget driver.
      
      	net2272 and net2280 got a fix for a regression caused by
      	the udc_start/udc_stop conversion.
      
      	We're defining a static inline no-op for otg_ulpi_create()
      	to prevent build errors when that driver isn't enabled.
      
      	FunctionFS got a fix for an off-by-one error when binding
      	and unbinding instances of FunctionFS.
      
      	MUSB learned that it shouldn't try to unmap buffers which
      	weren't previously mapped.
      
      	f_rndis got a fix for a possible NULL pointer dereference
      	in a debugging message code.
      
      	MUSB's DA8xx glue layer got a build fix due to a typo.
      d93acbca
    • P
      usb: gadget: net2272: finally convert "CONFIG_USB_GADGET_NET2272_DMA" · eda81bea
      Paul Bolle 提交于
      The Kconfig symbol USB_GADGET_NET2272_DMA was renamed to USB_NET2272_DMA
      in commit 193ab2a6 ("usb: gadget: allow
      multiple gadgets to be built"). That commit did not convert the only
      occurrence of the corresponding Kconfig macro. Convert that macro now.
      Signed-off-by: NPaul Bolle <pebolle@tiscali.nl>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      eda81bea
    • A
      USB: EHCI: fix regression in QH unlinking · d714aaf6
      Alan Stern 提交于
      This patch (as1670) fixes a regression caused by commit
      6402c796 (USB: EHCI: work around
      silicon bug in Intel's EHCI controllers).  The workaround goes through
      two IAA cycles for each QH being unlinked.  During the first cycle,
      the QH is not added to the async_iaa list (because it isn't fully gone
      from the hardware yet), which means that list will be empty.
      
      Unfortunately, I forgot to update the IAA watchdog timer routine.  It
      thinks that an empty async_iaa list means the timer expiration was an
      error, which isn't true any more.  This problem didn't show up during
      initial testing because the controllers being tested all had working
      IAA interrupts.  But not all controllers do, and when the watchdog
      timer expires, the empty-list check prevents the second IAA cycle from
      starting.  As a result, URB unlinks never complete.  The check needs
      to be removed.
      
      Among the symptoms of the regression are processes stuck in D wait
      states and hangs during system shutdown.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Reported-and-tested-by: NStephen Warren <swarren@wwwdotorg.org>
      Reported-and-tested-by: NSven Joachim <svenjoac@gmx.de>
      Reported-by: NAndreas Bombe <aeb@debian.org>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      d714aaf6
  3. 20 3月, 2013 6 次提交
  4. 19 3月, 2013 1 次提交
  5. 18 3月, 2013 2 次提交
  6. 16 3月, 2013 4 次提交
  7. 15 3月, 2013 4 次提交
    • M
      mm/fremap.c: fix possible oops on error path · a2362d24
      Michel Lespinasse 提交于
      The vm_flags introduced in 6d7825b1 ("mm/fremap.c: fix oops on error
      path") is supposed to avoid a compiler warning about unitialized
      vm_flags without changing the generated code.
      
      However I am concerned that this is going to be very brittle, and fail
      with some compiler versions. The failure could be either of:
      
      - compiler could actually load vma->vm_flags before checking for the
        !vma condition, thus reintroducing the oops
      
      - compiler could optimize out the !vma check, since the pointer just got
        dereferenced shortly before (so the compiler knows it can't be NULL!)
      
      I propose reversing this part of the change and initializing vm_flags to 0
      just to avoid the bogus uninitialized use warning.
      Signed-off-by: NMichel Lespinasse <walken@google.com>
      Cc: Tommi Rantala <tt.rantala@gmail.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      a2362d24
    • L
      Merge branch 'rcu/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu · f4846e52
      Linus Torvalds 提交于
      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
    • P
      list: Fix double fetch of pointer in hlist_entry_safe() · f65846a1
      Paul E. McKenney 提交于
      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: NCAI Qian <caiqian@redhat.com>
      Reported-by: NEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      Tested-by: NLi Zefan <lizefan@huawei.com>
      f65846a1
    • L
      Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs · 40e4591d
      Linus Torvalds 提交于
      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
  8. 14 3月, 2013 12 次提交
    • B
      usb: gadget: u_serial: fix typo which cause build warning · 273daf2f
      Bo Shen 提交于
      fix typo error introduced by commit ea0e6276 (usb: gadget: add
      multiple definition guards) which causes the following build warning:
      
        warning: "pr_vdebug" redefined
      Signed-off-by: NBo Shen <voice.shen@atmel.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      273daf2f
    • M
      usb: musb: da8xx: Fix build breakage due to typo · db9e5161
      Mikhail Kshevetskiy 提交于
      Commit 032ec49f (usb: musb: drop useless
      board_mode usage) introduced a typo that breaks the build.
      Signed-off-by: NMikhail Kshevetskiy <mikhail.kshevetskiy@gmail.com>
      
      [ Fixed commit message ]
      
      Cc: Mikhail Kshevetskiy <mikhail.kshevetskiy@gmail.com>
      Cc: Sergei Shtylyov <sshtylyov@mvista.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: stable@vger.kernel.org
      Signed-off-by: NMichael Riesch <michael.riesch@omicron.at>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      db9e5161
    • L
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace · aea8b5d1
      Linus Torvalds 提交于
      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
    • L
      Merge branch 'akpm' (fixes from Andrew) · 842d223f
      Linus Torvalds 提交于
      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
    • T
      idr: idr_alloc() shouldn't trigger lowmem warning when preloaded · 59bfbcf0
      Tejun Heo 提交于
      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: NTejun Heo <tj@kernel.org>
      Reported-by: NDavid Teigland <teigland@redhat.com>
      Tested-by: NDavid Teigland <teigland@redhat.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      59bfbcf0
    • D
      UAPI: fix endianness conditionals in M32R's asm/stat.h · 415586c9
      David Howells 提交于
      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: NDavid Howells <dhowells@redhat.com>
      Cc: Hirokazu Takata <takata@linux-m32r.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      415586c9
    • D
      UAPI: fix endianness conditionals in linux/raid/md_p.h · ca044f9a
      David Howells 提交于
      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: NDavid Howells <dhowells@redhat.com>
      Acked-by: NNeilBrown <neilb@suse.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      ca044f9a
    • D
      UAPI: fix endianness conditionals in linux/acct.h · 29ba06b9
      David Howells 提交于
      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: NDavid Howells <dhowells@redhat.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      29ba06b9
    • D
      UAPI: fix endianness conditionals in linux/aio_abi.h · 51b154ed
      David Howells 提交于
      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: NDavid Howells <dhowells@redhat.com>
      Acked-by: NBenjamin LaHaise <bcrl@kvack.org>
      Acked-by: NJeff Moyer <jmoyer@redhat.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      51b154ed
    • P
      decompressors: fix typo "POWERPC" · 97da55fc
      Paul Bolle 提交于
      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: NPaul 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: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      97da55fc
    • A
      mm/fremap.c: fix oops on error path · 6d7825b1
      Andrew Morton 提交于
      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: NTommi Rantala <tt.rantala@gmail.com>
      Cc: Michel Lespinasse <walken@google.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      6d7825b1
    • T
      idr: deprecate idr_pre_get() and idr_get_new[_above]() · c8615d37
      Tejun Heo 提交于
      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: NTejun Heo <tj@kernel.org>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      c8615d37