1. 16 Apr, 2014 9 commits
    • Chao Bi's avatar
      usb: gadget: ffs: race between ffs_epfile_io() and ffs_func_eps_disable() · 97839ca4
      Chao Bi authored
      ffs_epfile_io() is called from userspace, while ffs_func_eps_disable() might be
      called from USB disconnect interrupt, the two functions would run in parallel
      but they are not well protected, that epfile->ep would be removed by
      ffs_func_eps_disable() during ffs_epfile_io() is referring this pointer, then
      it leads to kernel PANIC.
      
      The scenario is as below:
      
      Thread 1                                 Thread 2
         |                                        |
      SyS_read                             dwc3_gadget_disconnect_interrupt
         |                                        |
      ffs_epfile_read                         reset_config
         |                                        |
      ffs_epfile_io                       ffs_func_eps_disable
         |                                        |
       -----                      usb_ep_disable():  epfile->ep->ep->desc = NULL
         |                                        |
      usb_ep_align_maybe():                     -----
      it refers ep->desc->wMaxPacketSize        -----
      Signed-off-by: default avatarChao Bi <chao.bi@intel.com>
      Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
      97839ca4
    • Mathias Krause's avatar
      usb: phy: return an error in usb_get_phy() if try_module_get() fails · 9dc9cb0c
      Mathias Krause authored
      In case we found a matching USB PHY in usb_get_phy() but the call to
      try_module_get() fails, we shouldn't return a (probably soon dangling)
      pointer but an ERR_PTR instead.
      Signed-off-by: default avatarMathias Krause <minipli@googlemail.com>
      Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
      9dc9cb0c
    • Fabio Estevam's avatar
      usb: gadget: rndis: Include "u_rndis.h" · ae8dd0cc
      Fabio Estevam authored
      Include "u_rndis.h" in order to fix the following sparse warning:
      
      drivers/usb/gadget/rndis.c:1144:5: warning: symbol 'rndis_init' was not declared. Should it be static?
      drivers/usb/gadget/rndis.c:1177:6: warning: symbol 'rndis_exit' was not declared. Should it be static?
      Signed-off-by: default avatarFabio Estevam <fabio.estevam@freescale.com>
      Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
      ae8dd0cc
    • Suresh Gupta's avatar
      usb : gadget : fsl: fix the fault issue on rmmod · fc696881
      Suresh Gupta authored
      completion in udc_controller->done should be assign with proper
      value before complete called. The complete called in fsl_udc_release
      which intern called from usb_del_gadget_udc, so moving assignment
      before calling usb_del_gadget_udc
      Signed-off-by: default avatarSuresh Gupta <suresh.gupta@freescale.com>
      Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
      fc696881
    • Daniel Mack's avatar
      usb: musb: dsps: move debugfs_remove_recursive() · 0fca91b8
      Daniel Mack authored
      When the platform initialization fails due to missing resources, it will
      return -EPROBE_DEFER after dsps_musb_init() has been called.
      
      dsps_musb_init() calls dsps_musb_dbg_init() to allocate the debugfs
      nodes. At a later point in time, the probe will be retried, and
      dsps_musb_dbg_init() will be called again. debugfs_create_dir() will
      fail this time, as the node already exists, and so the entire device
      probe will fail with -ENOMEM.
      
      Fix this by moving debugfs_remove_recursive() from dsps_remove() to the
      plaform's exit function, so it will be cleanly torn down when the probe
      fails. It also feels more natural this way, as .exit is the counterpart
      to .init.
      Signed-off-by: default avatarDaniel Mack <zonque@gmail.com>
      Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
      0fca91b8
    • Lubomir Rintel's avatar
      usb: gadget: gadgetfs: Initialize CHIP to NULL before UDC probe · 5cdf7d5b
      Lubomir Rintel authored
      Otherwise the value from the last probe would be retained that possibly is
      freed since (the UDC is removed) and therefore no longer relevant. Reproducible
      with the dummy UDC:
      
        modprobe dummy_hcd
        mount -t gadgetfs gadgetfs /dev/gadget
        umount /dev/gadget
        rmmod dummy_hcd
        mount -t gadgetfs gadgetfs /dev/gadget
      
      BUG: unable to handle kernel paging request at ffffffffa066fd9d
      Call Trace:
       [<ffffffff811d0cd2>] ? d_alloc_name+0x22/0x50
       [<ffffffff812b74dc>] ? selinux_d_instantiate+0x1c/0x20
       [<ffffffffa067d687>] gadgetfs_create_file+0x27/0xa0 [gadgetfs]
       [<ffffffffa067da70>] ? setup_req.isra.4+0x80/0x80 [gadgetfs]
       [<ffffffffa067dbac>] gadgetfs_fill_super+0x13c/0x180 [gadgetfs]
       [<ffffffff811bc832>] mount_single+0x92/0xc0
       [<ffffffffa067d0f8>] gadgetfs_mount+0x18/0x20 [gadgetfs]
       [<ffffffff811bc8f9>] mount_fs+0x39/0x1b0
       [<ffffffff8116b220>] ? __alloc_percpu+0x10/0x20
       [<ffffffff811d6da3>] vfs_kern_mount+0x63/0xf0
       [<ffffffff811d93be>] do_mount+0x23e/0xac0
       [<ffffffff811660eb>] ? strndup_user+0x4b/0xf0
       [<ffffffff811d9f63>] SyS_mount+0x83/0xc0
       [<ffffffff81695b69>] system_call_fastpath+0x16/0x1b
      Signed-off-by: default avatarLubomir Rintel <lkundrak@v3.sk>
      Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
      5cdf7d5b
    • Roger Quadros's avatar
      usb: dwc3: core: Fix gadget for system suspend/resume · f45e5f00
      Roger Quadros authored
      During system resume, if the event buffers are not setup before
      the gadget controller starts then we start with invalid context
      and this can lead to bus access errors. This is especially true for
      platforms that loose the controller context during system suspend.
      e.g. AM437x.
      
      The following backtrace was found when the system is suspended
      and resumed with g_zero loaded on AM437x-evm (USB cable connected
      to host all the while).
      
      [  120.981506] WARNING: CPU: 0 PID: 1656 at drivers/bus/omap_l3_noc.c:137 l3_interrupt_handler+0x198/0x28c()
      [  120.981514] L3 custom error: MASTER:USB0 WR TARGET:GPMC
      [  120.981638] Modules linked in: g_mass_storage usb_f_mass_storage libcomposite configfs bufferclass_ti(O) omaplfb(O) cryptodev(O) dwc3 snd_soc_evm snd_soc_omap snd_pe
      [  120.981659] CPU: 0 PID: 1656 Comm: sh Tainted: G           O 3.12.10-gc559824 #1
      [  120.981669] Backtrace:
      [  120.981705] [<c0017880>] (dump_backtrace+0x0/0x10c) from [<c0017a1c>] (show_stack+0x18/0x1c)
      [  120.981730]  r6:c02819ac r5:00000009 r4:ec137cb8 r3:00000000
      [  120.981767] [<c0017a04>] (show_stack+0x0/0x1c) from [<c056c0b0>] (dump_stack+0x20/0x28)
      [  120.981802] [<c056c090>] (dump_stack+0x0/0x28) from [<c0046d08>] (warn_slowpath_common+0x70/0x90)
      [  120.981830] [<c0046c98>] (warn_slowpath_common+0x0/0x90) from [<c0046dcc>] (warn_slowpath_fmt+0x38/0x40)
      [  120.981856]  r8:c0855eb0 r7:00000002 r6:f1000700 r5:00000007 r4:80080003
      [  120.981886] [<c0046d94>] (warn_slowpath_fmt+0x0/0x40) from [<c02819ac>] (l3_interrupt_handler+0x198/0x28c)
      [  120.981900]  r3:c0801ab8 r2:c06cb354
      [  120.981936] [<c0281814>] (l3_interrupt_handler+0x0/0x28c) from [<c007162c>] (handle_irq_event_percpu+0x54/0x1b8)
      [  120.981962] [<c00715d8>] (handle_irq_event_percpu+0x0/0x1b8) from [<c00717c0>] (handle_irq_event+0x30/0x40)
      [  120.981993] [<c0071790>] (handle_irq_event+0x0/0x40) from [<c0074058>] (handle_fasteoi_irq+0x74/0x128)
      [  120.982006]  r4:ed0056c0 r3:00000000
      [  120.982033] [<c0073fe4>] (handle_fasteoi_irq+0x0/0x128) from [<c0070f34>] (generic_handle_irq+0x28/0x38)
      [  120.982046]  r4:0000002a r3:c0073fe4
      [  120.982085] [<c0070f0c>] (generic_handle_irq+0x0/0x38) from [<c0015560>] (handle_IRQ+0x38/0x8c)
      [  120.982098]  r4:c080137c r3:00000182
      [  120.982124] [<c0015528>] (handle_IRQ+0x0/0x8c) from [<c00087e0>] (gic_handle_irq+0x30/0x5c)
      [  120.982145]  r6:ec137dd0 r5:c07ac480 r4:fa24010c r3:00000100
      [  120.982169] [<c00087b0>] (gic_handle_irq+0x0/0x5c) from [<c056fcc0>] (__irq_svc+0x40/0x54)
      [  120.982179] Exception stack(0xec137dd0 to 0xec137e18)
      [  120.982195] 7dc0:                                     00000000 a00001d3 00000000 00000004
      [  120.982216] 7de0: a0000153 ec1d9010 c080de90 ec137e30 c080debc 00000000 ed756e44 ec137e2c
      [  120.982232] 7e00: ec137de0 ec137e18 bf1150e4 bf115474 60000153 ffffffff
      [  120.982253]  r7:ec137e04 r6:ffffffff r5:60000153 r4:bf115474
      [  120.982327] [<bf115438>] (dwc3_complete+0x0/0x40 [dwc3]) from [<c0338f50>] (dpm_complete+0xd4/0x19c)
      [  120.982341]  r5:ed756e10 r4:ed756e64
      [  120.982370] [<c0338e7c>] (dpm_complete+0x0/0x19c) from [<c0339034>] (dpm_resume_end+0x1c/0x20)
      [  120.982400] [<c0339018>] (dpm_resume_end+0x0/0x20) from [<c006d4ec>] (suspend_devices_and_enter+0x118/0x33c)
      [  120.982412]  r4:c0833da4 r3:00000000
      [  120.982436] [<c006d3d4>] (suspend_devices_and_enter+0x0/0x33c) from [<c006d928>] (pm_suspend+0x218/0x254)
      [  120.982458] [<c006d710>] (pm_suspend+0x0/0x254) from [<c006c594>] (state_store+0x70/0xc0)
      [  120.982478]  r6:c057a6cc r5:c06a8320 r4:00000003 r3:0000006d
      [  120.982515] [<c006c524>] (state_store+0x0/0xc0) from [<c0264cc0>] (kobj_attr_store+0x1c/0x28)
      [  120.982546] [<c0264ca4>] (kobj_attr_store+0x0/0x28) from [<c012ccb8>] (sysfs_write_file+0x170/0x1a4)
      [  120.982583] [<c012cb48>] (sysfs_write_file+0x0/0x1a4) from [<c00d17e4>] (vfs_write+0xb8/0x190)
      [  120.982611] [<c00d172c>] (vfs_write+0x0/0x190) from [<c00d1bf8>] (SyS_write+0x44/0x78)
      [  120.982641] [<c00d1bb4>] (SyS_write+0x0/0x78) from [<c0014660>] (ret_fast_syscall+0x0/0x30)
      Signed-off-by: default avatarRoger Quadros <rogerq@ti.com>
      Acked-by: default avatarFelipe Balbi <balbi@ti.com>
      Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
      f45e5f00
    • Roger Quadros's avatar
      usb: gadget: zero: Fix SuperSpeed enumeration for alternate setting 1 · 9c1b7036
      Roger Quadros authored
      It was impossible to enumerate on a SuperSpeed (XHCI) host
      with alternate setting = 1 due to the wrongly set 'bMaxBurst'
      field in the SuperSpeed Endpoint Companion descriptor.
      
      Testcase:
      <host> modprobe -r usbtest; modprobe usbtest alt=1
      <device> modprobe g_zero
      plug device to SuperSpeed port on the host.
      
      Without this patch the host always complains like so
      "usb 12-2: Not enough bandwidth for new device state.
       usb 12-2: Not enough bandwidth for altsetting 1"
      
      Bug was introduced by commit cf9a08ae in v3.9
      
      Fixes: cf9a08ae (usb: gadget: convert source sink and loopback to
      new function interface)
      
      Cc: 3.9+ <stable@vger.kernel.org> # 3.9+
      Reviewed-by: default avatarFelipe Balbi <balbi@ti.com>
      Acked-by: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Signed-off-by: default avatarRoger Quadros <rogerq@ti.com>
      Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
      9c1b7036
    • Jack Pham's avatar
      usb: dwc3: gadget: Iterate only over valid endpoints · 32702e96
      Jack Pham authored
      Make dwc3_gadget_resize_tx_fifos() iterate only over IN
      endpoints that are actually present, based on the
      num_in_eps parameter. This terminates the loop so as to
      prevent dereferencing a potential NULL dwc->eps[i] where
      i >= (num_in_eps + num_out_eps).
      Signed-off-by: default avatarJack Pham <jackp@codeaurora.org>
      Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
      32702e96
  2. 15 Apr, 2014 2 commits
  3. 13 Apr, 2014 12 commits
    • Linus Torvalds's avatar
      Linux 3.15-rc1 · c9eaa447
      Linus Torvalds authored
      c9eaa447
    • Geert Uytterhoeven's avatar
      mm: Initialize error in shmem_file_aio_read() · f7c1d074
      Geert Uytterhoeven authored
      Some versions of gcc even warn about it:
      
        mm/shmem.c: In function ‘shmem_file_aio_read’:
        mm/shmem.c:1414: warning: ‘error’ may be used uninitialized in this function
      
      If the loop is aborted during the first iteration by one of the two
      first break statements, error will be uninitialized.
      
      Introduced by commit 6e58e79d ("introduce copy_page_to_iter, kill
      loop over iovec in generic_file_aio_read()").
      Signed-off-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
      Acked-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      f7c1d074
    • Geert Uytterhoeven's avatar
      cifs: Use min_t() when comparing "size_t" and "unsigned long" · e686bd8d
      Geert Uytterhoeven authored
      On 32 bit, size_t is "unsigned int", not "unsigned long", causing the
      following warning when comparing with PAGE_SIZE, which is always "unsigned
      long":
      
        fs/cifs/file.c: In function ‘cifs_readdata_to_iov’:
        fs/cifs/file.c:2757: warning: comparison of distinct pointer types lacks a cast
      
      Introduced by commit 7f25bba8 ("cifs_iovec_read: keep iov_iter
      between the calls of cifs_readdata_to_iov()"), which changed the
      signedness of "remaining" and the code from min_t() to min().
      Signed-off-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      e686bd8d
    • Linus Torvalds's avatar
      Merge branch 'slab/next' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/linux · bf3a3407
      Linus Torvalds authored
      Pull slab changes from Pekka Enberg:
       "The biggest change is byte-sized freelist indices which reduces slab
        freelist memory usage:
      
          https://lkml.org/lkml/2013/12/2/64"
      
      * 'slab/next' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/linux:
        mm: slab/slub: use page->list consistently instead of page->lru
        mm/slab.c: cleanup outdated comments and unify variables naming
        slab: fix wrongly used macro
        slub: fix high order page allocation problem with __GFP_NOFAIL
        slab: Make allocations with GFP_ZERO slightly more efficient
        slab: make more slab management structure off the slab
        slab: introduce byte sized index for the freelist of a slab
        slab: restrict the number of objects in a slab
        slab: introduce helper functions to get/set free object
        slab: factor out calculate nr objects in cache_estimate
      bf3a3407
    • Linus Torvalds's avatar
      Merge branch 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild · 321d03c8
      Linus Torvalds authored
      Pull misc kbuild changes from Michal Marek:
       "Here is the non-critical part of kbuild:
         - One bogus coccinelle check removed, one check fixed not to suggest
           the obsolete PTR_RET macro
         - scripts/tags.sh does not index the generated *.mod.c files
         - new objdiff tool to list differences between two versions of an
           object file
         - A fix for scripts/bootgraph.pl"
      
      * 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
        scripts/coccinelle: Use PTR_ERR_OR_ZERO
        scripts/bootgraph.pl: Add graphic header
        scripts: objdiff: detect object code changes between two commits
        Coccicheck: Remove memcpy to struct assignment test
        scripts/tags.sh: Ignore *.mod.c
      321d03c8
    • Mikulas Patocka's avatar
      sym53c8xx_2: Set DID_REQUEUE return code when aborting squeue · fd1232b2
      Mikulas Patocka authored
      This patch fixes I/O errors with the sym53c8xx_2 driver when the disk
      returns QUEUE FULL status.
      
      When the controller encounters an error (including QUEUE FULL or BUSY
      status), it aborts all not yet submitted requests in the function
      sym_dequeue_from_squeue.
      
      This function aborts them with DID_SOFT_ERROR.
      
      If the disk has full tag queue, the request that caused the overflow is
      aborted with QUEUE FULL status (and the scsi midlayer properly retries
      it until it is accepted by the disk), but the sym53c8xx_2 driver aborts
      the following requests with DID_SOFT_ERROR --- for them, the midlayer
      does just a few retries and then signals the error up to sd.
      
      The result is that disk returning QUEUE FULL causes request failures.
      
      The error was reproduced on 53c895 with COMPAQ BD03685A24 disk
      (rebranded ST336607LC) with command queue 48 or 64 tags.  The disk has
      64 tags, but under some access patterns it return QUEUE FULL when there
      are less than 64 pending tags.  The SCSI specification allows returning
      QUEUE FULL anytime and it is up to the host to retry.
      Signed-off-by: default avatarMikulas Patocka <mpatocka@redhat.com>
      Cc: Matthew Wilcox <matthew@wil.cx>
      Cc: James Bottomley <JBottomley@Parallels.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      fd1232b2
    • Paul Mackerras's avatar
      powerpc: Don't try to set LPCR unless we're in hypervisor mode · 18aa0da3
      Paul Mackerras authored
      Commit 8f619b54 ("powerpc/ppc64: Do not turn AIL (reloc-on
      interrupts) too early") added code to set the AIL bit in the LPCR
      without checking whether the kernel is running in hypervisor mode.  The
      result is that when the kernel is running as a guest (i.e., under
      PowerKVM or PowerVM), the processor takes a privileged instruction
      interrupt at that point, causing a panic.  The visible result is that
      the kernel hangs after printing "returning from prom_init".
      
      This fixes it by checking for hypervisor mode being available before
      setting LPCR.  If we are not in hypervisor mode, we enable relocation-on
      interrupts later in pSeries_setup_arch using the H_SET_MODE hcall.
      Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
      Acked-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      18aa0da3
    • Davidlohr Bueso's avatar
      futex: update documentation for ordering guarantees · d7e8af1a
      Davidlohr Bueso authored
      Commits 11d4616b ("futex: revert back to the explicit waiter
      counting code") and 69cd9eba ("futex: avoid race between requeue and
      wake") changed some of the finer details of how we think about futexes.
      One was a late fix and the other a consequence of overlooking the whole
      requeuing logic.
      
      The first change caused our documentation to be incorrect, and the
      second made us aware that we need to explicitly add more details to it.
      Signed-off-by: default avatarDavidlohr Bueso <davidlohr@hp.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      d7e8af1a
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · 454fd351
      Linus Torvalds authored
      Pull yet more networking updates from David Miller:
      
       1) Various fixes to the new Redpine Signals wireless driver, from
          Fariya Fatima.
      
       2) L2TP PPP connect code takes PMTU from the wrong socket, fix from
          Dmitry Petukhov.
      
       3) UFO and TSO packets differ in whether they include the protocol
          header in gso_size, account for that in skb_gso_transport_seglen().
         From Florian Westphal.
      
       4) If VLAN untagging fails, we double free the SKB in the bridging
          output path.  From Toshiaki Makita.
      
       5) Several call sites of sk->sk_data_ready() were referencing an SKB
          just added to the socket receive queue in order to calculate the
          second argument via skb->len.  This is dangerous because the moment
          the skb is added to the receive queue it can be consumed in another
          context and freed up.
      
          It turns out also that none of the sk->sk_data_ready()
          implementations even care about this second argument.
      
          So just kill it off and thus fix all these use-after-free bugs as a
          side effect.
      
       6) Fix inverted test in tcp_v6_send_response(), from Lorenzo Colitti.
      
       7) pktgen needs to do locking properly for LLTX devices, from Daniel
          Borkmann.
      
       8) xen-netfront driver initializes TX array entries in RX loop :-) From
          Vincenzo Maffione.
      
       9) After refactoring, some tunnel drivers allow a tunnel to be
          configured on top itself.  Fix from Nicolas Dichtel.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (46 commits)
        vti: don't allow to add the same tunnel twice
        gre: don't allow to add the same tunnel twice
        drivers: net: xen-netfront: fix array initialization bug
        pktgen: be friendly to LLTX devices
        r8152: check RTL8152_UNPLUG
        net: sun4i-emac: add promiscuous support
        net/apne: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO
        net: ipv6: Fix oif in TCP SYN+ACK route lookup.
        drivers: net: cpsw: enable interrupts after napi enable and clearing previous interrupts
        drivers: net: cpsw: discard all packets received when interface is down
        net: Fix use after free by removing length arg from sk_data_ready callbacks.
        Drivers: net: hyperv: Address UDP checksum issues
        Drivers: net: hyperv: Negotiate suitable ndis version for offload support
        Drivers: net: hyperv: Allocate memory for all possible per-pecket information
        bridge: Fix double free and memory leak around br_allowed_ingress
        bonding: Remove debug_fs files when module init fails
        i40evf: program RSS LUT correctly
        i40evf: remove open-coded skb_cow_head
        ixgb: remove open-coded skb_cow_head
        igbvf: remove open-coded skb_cow_head
        ...
      454fd351
    • Linus Torvalds's avatar
      Merge tag 'blackfin-for-linus' of... · fd18f00d
      Linus Torvalds authored
      Merge tag 'blackfin-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/realmz6/blackfin-linux
      
      Pull blackfin updates from Steven Miao:
       "Code cleanup, some previously ignored patches, and bug fixes"
      
      * tag 'blackfin-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/realmz6/blackfin-linux:
        blackfin: cleanup board files
        bf609: clock: drop unused clock bit set/clear functions
        Blackfin: bf537: rename "CONFIG_ADT75"
        Blackfin: bf537: rename "CONFIG_AD7314"
        Blackfin: bf537: rename ad2s120x ->ad2s1200
        blackfin: bf537: fix typo "CONFIG_SND_SOC_ADV80X_MODULE"
        blackfin: dma: current count mmr is read only
        bfin_crc: Move architecture independant crc header file out of the blackfin folder.
        bf54x: drop unuesd HOST status,control,timeout registers bit define macros
        blackfin: portmux: cleanup head file
        Blackfin: remove "config IP_CHECKSUM_L1"
        blackfin: Remove GENERIC_GPIO config option again
        blackfin:Use generic /proc/interrupts implementation
        blackfin: bf60x: fix typo "CONFIG_PM_BFIN_WAKE_PA15_POL"
      fd18f00d
    • Linus Torvalds's avatar
      Merge tag 'remoteproc-3.15-cleanups' of... · de0c9cf9
      Linus Torvalds authored
      Merge tag 'remoteproc-3.15-cleanups' of git://git.kernel.org/pub/scm/linux/kernel/git/ohad/remoteproc
      
      Pull remoteproc cleanups from Ohad Ben-Cohen:
       "Several remoteproc cleanup patches coming from Jingoo Han, Julia
        Lawall and Uwe Kleine-König"
      
      * tag 'remoteproc-3.15-cleanups' of git://git.kernel.org/pub/scm/linux/kernel/git/ohad/remoteproc:
        remoteproc/ste_modem: staticize local symbols
        remoteproc/davinci: simplify use of devm_ioremap_resource
        remoteproc/davinci: drop needless devm_clk_put
      de0c9cf9
    • Linus Torvalds's avatar
      Merge tag 'llvmlinux-for-v3.15' of git://git.linuxfoundation.org/llvmlinux/kernel · 09c9b61d
      Linus Torvalds authored
      Pull llvm patches from Behan Webster:
       "These are some initial updates to support compiling the kernel with
        clang.
      
        These patches have been through the proper reviews to the best of my
        ability, and have been soaking in linux-next for a few weeks.  These
        patches by themselves still do not completely allow clang to be used
        with the kernel code, but lay the foundation for other patches which
        are still under review.
      
        Several other of the LLVMLinux patches have been already added via
        maintainer trees"
      
      * tag 'llvmlinux-for-v3.15' of git://git.linuxfoundation.org/llvmlinux/kernel:
        x86: LLVMLinux: Fix "incomplete type const struct x86cpu_device_id"
        x86 kbuild: LLVMLinux: More cc-options added for clang
        x86, acpi: LLVMLinux: Remove nested functions from Thinkpad ACPI
        LLVMLinux: Add support for clang to compiler.h and new compiler-clang.h
        LLVMLinux: Remove warning about returning an uninitialized variable
        kbuild: LLVMLinux: Fix LINUX_COMPILER definition script for compilation with clang
        Documentation: LLVMLinux: Update Documentation/dontdiff
        kbuild: LLVMLinux: Adapt warnings for compilation with clang
        kbuild: LLVMLinux: Add Kbuild support for building kernel with Clang
      09c9b61d
  4. 12 Apr, 2014 17 commits
    • Linus Torvalds's avatar
      Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending · 141eaccd
      Linus Torvalds authored
      Pull SCSI target updates from Nicholas Bellinger:
       "Here are the target pending updates for v3.15-rc1.  Apologies in
        advance for waiting until the second to last day of the merge window
        to send these out.
      
        The highlights this round include:
      
         - iser-target support for T10 PI (DIF) offloads (Sagi + Or)
         - Fix Task Aborted Status (TAS) handling in target-core (Alex Leung)
         - Pass in transport supported PI at session initialization (Sagi + MKP + nab)
         - Add WRITE_INSERT + READ_STRIP T10 PI support in target-core (nab + Sagi)
         - Fix iscsi-target ERL=2 ASYNC_EVENT connection pointer bug (nab)
         - Fix tcm_fc use-after-free of ft_tpg (Andy Grover)
         - Use correct ib_sg_dma primitives in ib_isert (Mike Marciniszyn)
      
        Also, note the virtio-scsi + vhost-scsi changes to expose T10 PI
        metadata into KVM guest have been left-out for now, as there where a
        few comments from MST + Paolo that where not able to be addressed in
        time for v3.15.  Please expect this feature for v3.16-rc1"
      
      * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending: (43 commits)
        ib_srpt: Use correct ib_sg_dma primitives
        target/tcm_fc: Rename ft_tport_create to ft_tport_get
        target/tcm_fc: Rename ft_{add,del}_lport to {add,del}_wwn
        target/tcm_fc: Rename structs and list members for clarity
        target/tcm_fc: Limit to 1 TPG per wwn
        target/tcm_fc: Don't export ft_lport_list
        target/tcm_fc: Fix use-after-free of ft_tpg
        target: Add check to prevent Abort Task from aborting itself
        target: Enable READ_STRIP emulation in target_complete_ok_work
        target/sbc: Add sbc_dif_read_strip software emulation
        target: Enable WRITE_INSERT emulation in target_execute_cmd
        target/sbc: Add sbc_dif_generate software emulation
        target/sbc: Only expose PI read_cap16 bits when supported by fabric
        target/spc: Only expose PI mode page bits when supported by fabric
        target/spc: Only expose PI inquiry bits when supported by fabric
        target: Pass in transport supported PI at session initialization
        target/iblock: Fix double bioset_integrity_free bug
        Target/sbc: Initialize COMPARE_AND_WRITE write_sg scatterlist
        target/rd: T10-Dif: RAM disk is allocating more space than required.
        iscsi-target: Fix ERL=2 ASYNC_EVENT connection pointer bug
        ...
      141eaccd
    • Linus Torvalds's avatar
      Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media · 93094449
      Linus Torvalds authored
      Pull media fixes from Mauro Carvalho Chehab:
       "A series of bug fix patches for v3.15-rc1.  Most are just driver
        fixes.  There are some changes at remote controller core level, fixing
        some definitions on a new API added for Kernel v3.15.
      
        It also adds the missing include at include/uapi/linux/v4l2-common.h,
        to allow its compilation on userspace, as pointed by you"
      
      * 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (24 commits)
        [media] gpsca: remove the risk of a division by zero
        [media] stk1160: warrant a NUL terminated string
        [media] v4l: ti-vpe: retain v4l2_buffer flags for captured buffers
        [media] v4l: ti-vpe: Set correct field parameter for output and capture buffers
        [media] v4l: ti-vpe: zero out reserved fields in try_fmt
        [media] v4l: ti-vpe: Fix initial configuration queue data
        [media] v4l: ti-vpe: Use correct bus_info name for the device in querycap
        [media] v4l: ti-vpe: report correct capabilities in querycap
        [media] v4l: ti-vpe: Allow usage of smaller images
        [media] v4l: ti-vpe: Use video_device_release_empty
        [media] v4l: ti-vpe: Make sure in job_ready that we have the needed number of dst_bufs
        [media] lgdt3305: include sleep functionality in lgdt3304_ops
        [media] drx-j: use customise option correctly
        [media] m88rs2000: fix sparse static warnings
        [media] r820t: fix size and init values
        [media] rc-core: remove generic scancode filter
        [media] rc-core: split dev->s_filter
        [media] rc-core: do not change 32bit NEC scancode format for now
        [media] rtl28xxu: remove duplicate ID 0458:707f Genius TVGo DVB-T03
        [media] xc2028: add missing break to switch
        ...
      93094449
    • Linus Torvalds's avatar
      Merge tag 'ntb-3.15' of git://github.com/jonmason/ntb · 07f5fef9
      Linus Torvalds authored
      Pull PCIe non-transparent bridge fixes and features from Jon Mason:
       "NTB driver bug fixes to address issues in list traversal, skb leak in
        ntb_netdev, a typo, and a leak of msix entries in the error path.
        Clean ups of the event handling logic, as well as a overall style
        cleanup.  Finally, the driver was converted to use the new
        pci_enable_msix_range logic (and the refactoring to go along with it)"
      
      * tag 'ntb-3.15' of git://github.com/jonmason/ntb:
        ntb: Use pci_enable_msix_range() instead of pci_enable_msix()
        ntb: Split ntb_setup_msix() into separate BWD/SNB routines
        ntb: Use pci_msix_vec_count() to obtain number of MSI-Xs
        NTB: Code Style Clean-up
        NTB: client event cleanup
        ntb: Fix leakage of ntb_device::msix_entries[] array
        NTB: Fix typo in setting one translation register
        ntb_netdev: Fix skb free issue in open
        ntb_netdev: Fix list_for_each_entry exit issue
      07f5fef9
    • Linus Torvalds's avatar
      ceph: fix pr_fmt() redefinition · 96c57ade
      Linus Torvalds authored
      The vfs merge caused a latent bug to show up:
      
         In file included from fs/ceph/super.h:4:0,
                          from fs/ceph/ioctl.c:3:
         include/linux/ceph/ceph_debug.h:4:0: warning: "pr_fmt" redefined [enabled by default]
          #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
          ^
         In file included from include/linux/kernel.h:13:0,
                          from include/linux/uio.h:12,
                          from include/linux/socket.h:7,
                          from include/uapi/linux/in.h:22,
                          from include/linux/in.h:23,
                          from fs/ceph/ioctl.c:1:
         include/linux/printk.h:214:0: note: this is the location of the previous definition
          #define pr_fmt(fmt) fmt
          ^
      
      where the reason is that <linux/ceph_debug.h> is included much too late
      for the "pr_fmt()" define.
      
      The include of <linux/ceph_debug.h> needs to be the first include in the
      file, but fs/ceph/ioctl.c had for some reason missed that, and it wasn't
      noticeable until some unrelated header file changes brought in an
      indirect earlier include of <linux/kernel.h>.
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      96c57ade
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · 5166701b
      Linus Torvalds authored
      Pull vfs updates from Al Viro:
       "The first vfs pile, with deep apologies for being very late in this
        window.
      
        Assorted cleanups and fixes, plus a large preparatory part of iov_iter
        work.  There's a lot more of that, but it'll probably go into the next
        merge window - it *does* shape up nicely, removes a lot of
        boilerplate, gets rid of locking inconsistencie between aio_write and
        splice_write and I hope to get Kent's direct-io rewrite merged into
        the same queue, but some of the stuff after this point is having
        (mostly trivial) conflicts with the things already merged into
        mainline and with some I want more testing.
      
        This one passes LTP and xfstests without regressions, in addition to
        usual beating.  BTW, readahead02 in ltp syscalls testsuite has started
        giving failures since "mm/readahead.c: fix readahead failure for
        memoryless NUMA nodes and limit readahead pages" - might be a false
        positive, might be a real regression..."
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (63 commits)
        missing bits of "splice: fix racy pipe->buffers uses"
        cifs: fix the race in cifs_writev()
        ceph_sync_{,direct_}write: fix an oops on ceph_osdc_new_request() failure
        kill generic_file_buffered_write()
        ocfs2_file_aio_write(): switch to generic_perform_write()
        ceph_aio_write(): switch to generic_perform_write()
        xfs_file_buffered_aio_write(): switch to generic_perform_write()
        export generic_perform_write(), start getting rid of generic_file_buffer_write()
        generic_file_direct_write(): get rid of ppos argument
        btrfs_file_aio_write(): get rid of ppos
        kill the 5th argument of generic_file_buffered_write()
        kill the 4th argument of __generic_file_aio_write()
        lustre: don't open-code kernel_recvmsg()
        ocfs2: don't open-code kernel_recvmsg()
        drbd: don't open-code kernel_recvmsg()
        constify blk_rq_map_user_iov() and friends
        lustre: switch to kernel_sendmsg()
        ocfs2: don't open-code kernel_sendmsg()
        take iov_iter stuff to mm/iov_iter.c
        process_vm_access: tidy up a bit
        ...
      5166701b
    • David S. Miller's avatar
      Merge branch 'tunnels' · eda43ce0
      David S. Miller authored
      Nicolas Dichtel says:
      
      ====================
      tunnels: don't allow to add the same tunnel twice
      
      This series fixes the check of an existing tunnel with the same
      parameters when a new tunnel is added.  I've checked all users of
      ip_tunnel_newlink(): gre, gretap, ipip and vti. The bug exists only
      for gre and vti.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      eda43ce0
    • Nicolas Dichtel's avatar
      vti: don't allow to add the same tunnel twice · 8d89dcdf
      Nicolas Dichtel authored
      Before the patch, it was possible to add two times the same tunnel:
      ip l a vti1 type vti remote 10.16.0.121 local 10.16.0.249 key 41
      ip l a vti2 type vti remote 10.16.0.121 local 10.16.0.249 key 41
      
      It was possible, because ip_tunnel_newlink() calls ip_tunnel_find() with the
      argument dev->type, which was set only later (when calling ndo_init handler
      in register_netdevice()). Let's set this type in the setup handler, which is
      called before newlink handler.
      
      Introduced by commit b9959fd3 ("vti: switch to new ip tunnel code").
      
      CC: Cong Wang <amwang@redhat.com>
      CC: Steffen Klassert <steffen.klassert@secunet.com>
      Signed-off-by: default avatarNicolas Dichtel <nicolas.dichtel@6wind.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8d89dcdf
    • Nicolas Dichtel's avatar
      gre: don't allow to add the same tunnel twice · 5a455275
      Nicolas Dichtel authored
      Before the patch, it was possible to add two times the same tunnel:
      ip l a gre1 type gre remote 10.16.0.121 local 10.16.0.249
      ip l a gre2 type gre remote 10.16.0.121 local 10.16.0.249
      
      It was possible, because ip_tunnel_newlink() calls ip_tunnel_find() with the
      argument dev->type, which was set only later (when calling ndo_init handler
      in register_netdevice()). Let's set this type in the setup handler, which is
      called before newlink handler.
      
      Introduced by commit c5441932 ("GRE: Refactor GRE tunneling code.").
      
      CC: Pravin B Shelar <pshelar@nicira.com>
      Signed-off-by: default avatarNicolas Dichtel <nicolas.dichtel@6wind.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5a455275
    • Vincenzo Maffione's avatar
      drivers: net: xen-netfront: fix array initialization bug · 810d8ced
      Vincenzo Maffione authored
      This patch fixes the initialization of an array used in the TX
      datapath that was mistakenly initialized together with the
      RX datapath arrays. An out of range array access could happen
      when RX and TX rings had different sizes.
      Signed-off-by: default avatarVincenzo Maffione <v.maffione@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      810d8ced
    • David S. Miller's avatar
      Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net · dcfba949
      David S. Miller authored
      Jeff Kirsher says:
      
      ====================
      Intel Wired LAN Driver Updates
      
      This series contains updates to e1000, e1000e, igb, igbvf, ixgb, ixgbe,
      ixgbevf and i40evf.
      
      Mark fixes an issue with ixgbe and ixgbevf by adding a bit to indicate
      when workqueues have been initialized.  This permits the register read
      error handling from attempting to use them prior to that, which also
      generates warnings.  Checking for a detected removal after initializing
      the work queues allows the probe function to return an error without
      getting the workqueue involved.  Further, if the error_detected
      callback is entered before the workqueues are initialized, exit without
      recovery since the device initialization was so truncated.
      
      Francois Romieu provides several patches to all the drivers to remove
      the open coded skb_cow_head.
      
      Jakub Kicinski provides a fix for igb where last_rx_timestamp should be
      updated only when Rx time stamp is read.
      
      Mitch provides a fix for i40evf where a recent change broke the RSS LUT
      programming causing it to be programmed with all 0's.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      dcfba949
    • Linus Torvalds's avatar
      Merge tag 'trace-3.15-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace · 0a7418f5
      Linus Torvalds authored
      Pull more tracing updates from Steven Rostedt:
       "This includes the final patch to clean up and fix the issue with the
        design of tracepoints and how a user could register a tracepoint and
        have that tracepoint not be activated but no error was shown.
      
        The design was for an out of tree module but broke in tree users.  The
        clean up was to remove the saving of the hash table of tracepoint
        names such that they can be enabled before they exist (enabling a
        module tracepoint before that module is loaded).  This added more
        complexity than needed.  The clean up was to remove that code and just
        enable tracepoints that exist or fail if they do not.
      
        This removed a lot of code as well as the complexity that it brought.
        As a side effect, instead of registering a tracepoint by its name, the
        tracepoint needs to be registered with the tracepoint descriptor.
        This removes having to duplicate the tracepoint names that are
        enabled.
      
        The second patch was added that simplified the way modules were
        searched for.
      
        This cleanup required changes that were in the 3.15 queue as well as
        some changes that were added late in the 3.14-rc cycle.  This final
        change waited till the two were merged in upstream and then the change
        was added and full tests were run.  Unfortunately, the test found some
        errors, but after it was already submitted to the for-next branch and
        not to be rebased.  Sparse errors were detected by Fengguang Wu's bot
        tests, and my internal tests discovered that the anonymous union
        initialization triggered a bug in older gcc compilers.  Luckily, there
        was a bugzilla for the gcc bug which gave a work around to the
        problem.  The third and fourth patch handled the sparse error and the
        gcc bug respectively.
      
        A final patch was tagged along to fix a missing documentation for the
        README file"
      
      * tag 'trace-3.15-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
        tracing: Add missing function triggers dump and cpudump to README
        tracing: Fix anonymous unions in struct ftrace_event_call
        tracepoint: Fix sparse warnings in tracepoint.c
        tracepoint: Simplify tracepoint module search
        tracepoint: Use struct pointer instead of name hash for reg/unreg tracepoints
      0a7418f5
    • Linus Torvalds's avatar
      Merge git://git.infradead.org/users/eparis/audit · 0b747172
      Linus Torvalds authored
      Pull audit updates from Eric Paris.
      
      * git://git.infradead.org/users/eparis/audit: (28 commits)
        AUDIT: make audit_is_compat depend on CONFIG_AUDIT_COMPAT_GENERIC
        audit: renumber AUDIT_FEATURE_CHANGE into the 1300 range
        audit: do not cast audit_rule_data pointers pointlesly
        AUDIT: Allow login in non-init namespaces
        audit: define audit_is_compat in kernel internal header
        kernel: Use RCU_INIT_POINTER(x, NULL) in audit.c
        sched: declare pid_alive as inline
        audit: use uapi/linux/audit.h for AUDIT_ARCH declarations
        syscall_get_arch: remove useless function arguments
        audit: remove stray newline from audit_log_execve_info() audit_panic() call
        audit: remove stray newlines from audit_log_lost messages
        audit: include subject in login records
        audit: remove superfluous new- prefix in AUDIT_LOGIN messages
        audit: allow user processes to log from another PID namespace
        audit: anchor all pid references in the initial pid namespace
        audit: convert PPIDs to the inital PID namespace.
        pid: get pid_t ppid of task in init_pid_ns
        audit: rename the misleading audit_get_context() to audit_take_context()
        audit: Add generic compat syscall support
        audit: Add CONFIG_HAVE_ARCH_AUDITSYSCALL
        ...
      0b747172
    • Al Viro's avatar
      missing bits of "splice: fix racy pipe->buffers uses" · a786c06d
      Al Viro authored
      that commit has fixed only the parts of that mess in fs/splice.c itself;
      there had been more in several other ->splice_read() instances...
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      a786c06d
    • Al Viro's avatar
      cifs: fix the race in cifs_writev() · 19dfc1f5
      Al Viro authored
      O_APPEND handling there hadn't been completely fixed by Pavel's
      patch; it checks the right value, but it's racy - we can't really
      do that until i_mutex has been taken.
      
      Fix by switching to __generic_file_aio_write() (open-coding
      generic_file_aio_write(), actually) and pulling mutex_lock() above
      inode_size_read().
      
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      19dfc1f5
    • Al Viro's avatar
      ceph_sync_{,direct_}write: fix an oops on ceph_osdc_new_request() failure · eab87235
      Al Viro authored
      ceph_osdc_put_request(ERR_PTR(-error)) oopses.  What we want there
      is break, not goto out.
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      eab87235
    • Daniel Borkmann's avatar
      pktgen: be friendly to LLTX devices · 0f2eea4b
      Daniel Borkmann authored
      Similarly to commit 43279500 ("packet: respect devices with
      LLTX flag in direct xmit"), we can basically apply the very same
      to pktgen. This will help testing against LLTX devices such as
      dummy driver (or others), which only have a single netdevice txq
      and would otherwise require locking their txq from pktgen side
      while e.g. in dummy case, we would not need any locking. Fix this
      by making use of HARD_TX_{UN,}LOCK API, so that NETIF_F_LLTX will
      be respected.
      Signed-off-by: default avatarDaniel Borkmann <dborkman@redhat.com>
      Signed-off-by: default avatarJesper Dangaard Brouer <brouer@redhat.com>
      Cc: Eric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0f2eea4b
    • hayeswang's avatar
      r8152: check RTL8152_UNPLUG · 6871438c
      hayeswang authored
      When the device is unplugged, the driver would try to disable the
      device. Add checking the flag of RTL8152_UNPLUG to skip setting
      the device when it is unplugged. This could shorten the time of
      unloading the driver.
      Signed-off-by: default avatarHayes Wang <hayeswang@realtek.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6871438c