1. 16 Jun, 2015 13 commits
    • Mathias Nyman's avatar
      xhci: fix isoc endpoint dequeue from advancing too far on transaction error · c7d668d4
      Mathias Nyman authored
      commit d104d015 upstream.
      
      Isoc TDs usually consist of one TRB, sometimes two. When all goes well we
      receive only one success event for a TD, and move the dequeue pointer to
      the next TD.
      
      This fails if the TD consists of two TRBs and we get a transfer error
      on the first TRB, we will then see two events for that TD.
      
      Fix this by making sure the event we get is for the last TRB in that TD
      before moving the dequeue pointer to the next TD. This will resolve some
      of the uvc and dvb issues with the
      "ERROR Transfer event TRB DMA ptr not part of current TD" error message
      Signed-off-by: default avatarMathias Nyman <mathias.nyman@linux.intel.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: default avatarKamal Mostafa <kamal@canonical.com>
      c7d668d4
    • NeilBrown's avatar
      md/raid5: don't record new size if resize_stripes fails. · ba7b6c30
      NeilBrown authored
      commit 6e9eac2d upstream.
      
      If any memory allocation in resize_stripes fails we will return
      -ENOMEM, but in some cases we update conf->pool_size anyway.
      
      This means that if we try again, the allocations will be assumed
      to be larger than they are, and badness results.
      
      So only update pool_size if there is no error.
      
      This bug was introduced in 2.6.17 and the patch is suitable for
      -stable.
      
      Fixes: ad01c9e3 ("[PATCH] md: Allow stripes to be expanded in preparation for expanding an array")
      Signed-off-by: default avatarNeilBrown <neilb@suse.de>
      Signed-off-by: default avatarKamal Mostafa <kamal@canonical.com>
      ba7b6c30
    • Rafael J. Wysocki's avatar
      ACPI / init: Fix the ordering of acpi_reserve_resources() · 8a1a6cb6
      Rafael J. Wysocki authored
      commit b9a5e5e1 upstream.
      
      Since acpi_reserve_resources() is defined as a device_initcall(),
      there's no guarantee that it will be executed in the right order
      with respect to the rest of the ACPI initialization code.  On some
      systems this leads to breakage if, for example, the address range
      that should be reserved for the ACPI fixed registers is given to
      the PCI host bridge instead if the race is won by the wrong code
      path.
      
      Fix this by turning acpi_reserve_resources() into a void function
      and calling it directly from within the ACPI initialization sequence.
      Reported-and-tested-by: default avatarGeorge McCollister <george.mccollister@gmail.com>
      Link: http://marc.info/?t=143092384600002&r=1&w=2Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Signed-off-by: default avatarKamal Mostafa <kamal@canonical.com>
      8a1a6cb6
    • Scott Mayhew's avatar
      svcrpc: fix potential GSSX_ACCEPT_SEC_CONTEXT decoding failures · 50b0cce2
      Scott Mayhew authored
      commit 9507271d upstream.
      
      In an environment where the KDC is running Active Directory, the
      exported composite name field returned in the context could be large
      enough to span a page boundary.  Attaching a scratch buffer to the
      decoding xdr_stream helps deal with those cases.
      
      The case where we saw this was actually due to behavior that's been
      fixed in newer gss-proxy versions, but we're fixing it here too.
      Signed-off-by: default avatarScott Mayhew <smayhew@redhat.com>
      Reviewed-by: default avatarSimo Sorce <simo@redhat.com>
      Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
      Signed-off-by: default avatarKamal Mostafa <kamal@canonical.com>
      50b0cce2
    • Christoph Hellwig's avatar
      nfsd: fix the check for confirmed openowner in nfs4_preprocess_stateid_op · 9e4bff50
      Christoph Hellwig authored
      commit ebe9cb3b upstream.
      
      If we find a non-confirmed openowner we jump to exit the function, but do
      not set an error value.  Fix this by factoring out a helper to do the
      check and properly set the error from nfsd4_validate_stateid.
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
      [ kamal: backport to 3.13-stable ]
      Signed-off-by: default avatarKamal Mostafa <kamal@canonical.com>
      9e4bff50
    • Jason A. Donenfeld's avatar
      USB: visor: Match I330 phone more precisely · 7f87f4dd
      Jason A. Donenfeld authored
      commit 82ee3aeb upstream.
      
      Samsung has just released a portable USB3 SSD, coming in a very small
      and nice form factor. It's USB ID is 04e8:8001, which unfortunately is
      already used by the Palm Visor driver for the Samsung I330 phone cradle.
      Having pl2303 or visor pick up this device ID results in conflicts with
      the usb-storage driver, which handles the newly released portable USB3
      SSD.
      
      To work around this conflict, I've dug up a mailing list post [1] from a
      long time ago, in which a user posts the full USB descriptor
      information. The most specific value in this appears to be the interface
      class, which has value 255 (0xff). Since usb-storage requires an
      interface class of 0x8, I believe it's correct to disambiguate the two
      devices by matching on 0xff inside visor.
      
      [1] http://permalink.gmane.org/gmane.linux.usb.user/4264Signed-off-by: default avatarJason A. Donenfeld <Jason@zx2c4.com>
      Fixes: 1da177e4 ("Linux-2.6.12-rc2")
      Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
      Signed-off-by: default avatarKamal Mostafa <kamal@canonical.com>
      7f87f4dd
    • Jason A. Donenfeld's avatar
      USB: pl2303: Remove support for Samsung I330 · 444a00d8
      Jason A. Donenfeld authored
      commit 48ef23a4 upstream.
      
      This phone is already supported by the visor driver.
      Signed-off-by: default avatarJason A. Donenfeld <Jason@zx2c4.com>
      Fixes: 1da177e4 ("Linux-2.6.12-rc2")
      Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
      Signed-off-by: default avatarKamal Mostafa <kamal@canonical.com>
      444a00d8
    • Mark Edwards's avatar
      USB: cp210x: add ID for KCF Technologies PRN device · c01f85ab
      Mark Edwards authored
      commit c735ed74 upstream.
      
      Added the USB serial console device ID for KCF Technologies PRN device
      which has a USB port for its serial console.
      Signed-off-by: default avatarMark Edwards <sonofaforester@gmail.com>
      Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
      Signed-off-by: default avatarKamal Mostafa <kamal@canonical.com>
      c01f85ab
    • Larry Finger's avatar
      rtlwifi: rtl8192cu: Fix kernel deadlock · 22e3fa6c
      Larry Finger authored
      commit 414b7e3b upstream.
      
      The USB mini-driver in rtlwifi, which is used by rtl8192cu, issues a call to
      usb_control_msg() with a timeout value of 0. In some instances where the
      interface is shutting down, this infinite wait results in a CPU deadlock. A
      one second timeout fixes this problem without affecting any normal operations.
      
      This bug is reported at https://bugzilla.novell.com/show_bug.cgi?id=927786.
      Reported-by: default avatarBernhard Wiedemann <bwiedemann@suse.com>
      Tested-by: default avatarBernhard Wiedemann <bwiedemann@suse.com>
      Signed-off-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
      Cc: Bernhard Wiedemann <bwiedemann@suse.com>
      Cc: Takashi Iwai<tiwai@suse.com>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      Signed-off-by: default avatarKamal Mostafa <kamal@canonical.com>
      22e3fa6c
    • Krzysztof Opasiak's avatar
      usb: gadget: configfs: Fix interfaces array NULL-termination · ada8b061
      Krzysztof Opasiak authored
      commit 903124fe upstream.
      
      memset() to 0 interfaces array before reusing
      usb_configuration structure.
      
      This commit fix bug:
      
      ln -s functions/acm.1 configs/c.1
      ln -s functions/acm.2 configs/c.1
      ln -s functions/acm.3 configs/c.1
      echo "UDC name" > UDC
      echo "" > UDC
      rm configs/c.1/acm.*
      rmdir functions/*
      mkdir functions/ecm.usb0
      ln -s functions/ecm.usb0 configs/c.1
      echo "UDC name" > UDC
      
      [   82.220969] Unable to handle kernel NULL pointer dereference at virtual address 00000000
      [   82.229009] pgd = c0004000
      [   82.231698] [00000000] *pgd=00000000
      [   82.235260] Internal error: Oops: 17 [#1] PREEMPT SMP ARM
      [   82.240638] Modules linked in:
      [   82.243681] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.0.0-rc2 #39
      [   82.249926] Hardware name: SAMSUNG EXYNOS (Flattened Device Tree)
      [   82.256003] task: c07cd2f0 ti: c07c8000 task.ti: c07c8000
      [   82.261393] PC is at composite_setup+0xe3c/0x1674
      [   82.266073] LR is at composite_setup+0xf20/0x1674
      [   82.270760] pc : [<c03510d4>]    lr : [<c03511b8>]    psr: 600001d3
      [   82.270760] sp : c07c9df0  ip : c0806448  fp : ed8c9c9c
      [   82.282216] r10: 00000001  r9 : 00000000  r8 : edaae918
      [   82.287425] r7 : ed551cc0  r6 : 00007fff  r5 : 00000000  r4 : ed799634
      [   82.293934] r3 : 00000003  r2 : 00010002  r1 : edaae918  r0 : 0000002e
      [   82.300446] Flags: nZCv  IRQs off  FIQs off  Mode SVC_32  ISA ARM  Segment kernel
      [   82.307910] Control: 10c5387d  Table: 6bc1804a  DAC: 00000015
      [   82.313638] Process swapper/0 (pid: 0, stack limit = 0xc07c8210)
      [   82.319627] Stack: (0xc07c9df0 to 0xc07ca000)
      [   82.323969] 9de0:                                     00000000 c06e65f4 00000000 c07c9f68
      [   82.332130] 9e00: 00000067 c07c59ac 000003f7 edaae918 ed8c9c98 ed799690 eca2f140 200001d3
      [   82.340289] 9e20: ee79a2d8 c07c9e88 c07c5304 ffff55db 00010002 edaae810 edaae860 eda96d50
      [   82.348448] 9e40: 00000009 ee264510 00000007 c07ca444 edaae860 c0340890 c0827a40 ffff55e0
      [   82.356607] 9e60: c0827a40 eda96e40 ee264510 edaae810 00000000 edaae860 00000007 c07ca444
      [   82.364766] 9e80: edaae860 c0354170 c03407dc c033db4c edaae810 00000000 00000000 00000010
      [   82.372925] 9ea0: 00000032 c0341670 00000000 00000000 00000001 eda96e00 00000000 00000000
      [   82.381084] 9ec0: 00000000 00000032 c0803a23 ee1aa840 00000001 c005d54c 249e2450 00000000
      [   82.389244] 9ee0: 200001d3 ee1aa840 ee1aa8a0 ed84f4c0 00000000 c07c9f68 00000067 c07c59ac
      [   82.397403] 9f00: 00000000 c005d688 ee1aa840 ee1aa8a0 c07db4b4 c006009c 00000032 00000000
      [   82.405562] 9f20: 00000001 c005ce20 c07c59ac c005cf34 f002000c c07ca780 c07c9f68 00000057
      [   82.413722] 9f40: f0020000 413fc090 00000001 c00086b4 c000f804 60000053 ffffffff c07c9f9c
      [   82.421880] 9f60: c0803a20 c0011fc0 00000000 00000000 c07c9fb8 c001bee0 c07ca4f0 c057004c
      [   82.430040] 9f80: c07ca4fc c0803a20 c0803a20 413fc090 00000001 00000000 01000000 c07c9fb0
      [   82.438199] 9fa0: c000f800 c000f804 60000053 ffffffff 00000000 c0050e70 c0803bc0 c0783bd8
      [   82.446358] 9fc0: ffffffff ffffffff c0783664 00000000 00000000 c07b13e8 00000000 c0803e54
      [   82.454517] 9fe0: c07ca480 c07b13e4 c07ce40c 4000406a 00000000 40008074 00000000 00000000
      [   82.462689] [<c03510d4>] (composite_setup) from [<c0340890>] (s3c_hsotg_complete_setup+0xb4/0x418)
      [   82.471626] [<c0340890>] (s3c_hsotg_complete_setup) from [<c0354170>] (usb_gadget_giveback_request+0xc/0x10)
      [   82.481429] [<c0354170>] (usb_gadget_giveback_request) from [<c033db4c>] (s3c_hsotg_complete_request+0xcc/0x12c)
      [   82.491583] [<c033db4c>] (s3c_hsotg_complete_request) from [<c0341670>] (s3c_hsotg_irq+0x4fc/0x558)
      [   82.500614] [<c0341670>] (s3c_hsotg_irq) from [<c005d54c>] (handle_irq_event_percpu+0x50/0x150)
      [   82.509291] [<c005d54c>] (handle_irq_event_percpu) from [<c005d688>] (handle_irq_event+0x3c/0x5c)
      [   82.518145] [<c005d688>] (handle_irq_event) from [<c006009c>] (handle_fasteoi_irq+0xd4/0x18c)
      [   82.526650] [<c006009c>] (handle_fasteoi_irq) from [<c005ce20>] (generic_handle_irq+0x20/0x30)
      [   82.535242] [<c005ce20>] (generic_handle_irq) from [<c005cf34>] (__handle_domain_irq+0x6c/0xdc)
      [   82.543923] [<c005cf34>] (__handle_domain_irq) from [<c00086b4>] (gic_handle_irq+0x2c/0x6c)
      [   82.552256] [<c00086b4>] (gic_handle_irq) from [<c0011fc0>] (__irq_svc+0x40/0x74)
      [   82.559716] Exception stack(0xc07c9f68 to 0xc07c9fb0)
      [   82.564753] 9f60:                   00000000 00000000 c07c9fb8 c001bee0 c07ca4f0 c057004c
      [   82.572913] 9f80: c07ca4fc c0803a20 c0803a20 413fc090 00000001 00000000 01000000 c07c9fb0
      [   82.581069] 9fa0: c000f800 c000f804 60000053 ffffffff
      [   82.586113] [<c0011fc0>] (__irq_svc) from [<c000f804>] (arch_cpu_idle+0x30/0x3c)
      [   82.593491] [<c000f804>] (arch_cpu_idle) from [<c0050e70>] (cpu_startup_entry+0x128/0x1a4)
      [   82.601740] [<c0050e70>] (cpu_startup_entry) from [<c0783bd8>] (start_kernel+0x350/0x3bc)
      [   82.609890] Code: 0a000002 e3530005 05975010 15975008 (e5953000)
      [   82.615965] ---[ end trace f57d5f599a5f1bfa ]---
      
      Most of kernel code assume that interface array in
      struct usb_configuration is NULL terminated.
      
      When gadget is composed with configfs configuration
      structure may be reused for different functions set.
      
      This bug happens because purge_configs_funcs() sets
      only next_interface_id to 0. Interface array still
      contains pointers to already freed interfaces. If in
      second try we add less interfaces than earlier we
      may access unallocated memory when trying to get
      interface descriptors.
      Signed-off-by: default avatarKrzysztof Opasiak <k.opasiak@samsung.com>
      Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
      Signed-off-by: default avatarKamal Mostafa <kamal@canonical.com>
      ada8b061
    • Gabriele Mazzotta's avatar
      libata: Ignore spurious PHY event on LPM policy change · 69e69d5f
      Gabriele Mazzotta authored
      commit 09c5b480 upstream.
      
      When the LPM policy is set to ATA_LPM_MAX_POWER, the device might
      generate a spurious PHY event that cuases errors on the link.
      Ignore this event if it occured within 10s after the policy change.
      
      The timeout was chosen observing that on a Dell XPS13 9333 these
      spurious events can occur up to roughly 6s after the policy change.
      
      Link: http://lkml.kernel.org/g/3352987.ugV1Ipy7Z5@xps13Signed-off-by: default avatarGabriele Mazzotta <gabriele.mzt@gmail.com>
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Signed-off-by: default avatarKamal Mostafa <kamal@canonical.com>
      69e69d5f
    • Gabriele Mazzotta's avatar
      libata: Add helper to determine when PHY events should be ignored · 93c93ff4
      Gabriele Mazzotta authored
      commit 8393b811 upstream.
      
      This is a preparation commit that will allow to add other criteria
      according to which PHY events should be dropped.
      Signed-off-by: default avatarGabriele Mazzotta <gabriele.mzt@gmail.com>
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Signed-off-by: default avatarKamal Mostafa <kamal@canonical.com>
      93c93ff4
    • Jean Delvare's avatar
      thermal: step_wise: Revert optimization · f304cd83
      Jean Delvare authored
      Commit 178c2490 ("thermal: step_wise:
      cdev only needs update on a new target state") broke driver acerhdf.
      That driver abused the step_wise thermal governor until the bang_bang
      governor was available, and the optimization broke this usage model.
      
      Kernels v3.12 to v3.18 are affected. In v3.19 the acerhdf driver was
      switched to the bang_bang governor and that solved the problem.
      
      For kernels v3.12 to v3.17, the bang_bang governor isn't available
      yet so the easiest fix is to revert the optimization.
      Signed-off-by: default avatarJean Delvare <jdelvare@suse.de>
      Reported-by: Dieter Jurzitza (https://bugzilla.opensuse.org/show_bug.cgi?id=925961)
      Tested-by: default avatarPeter Feuerer <peter@piie.net>
      Tested-by: Dieter Jurzitza
      Signed-off-by: default avatarLuis Henriques <luis.henriques@canonical.com>
      Signed-off-by: default avatarKamal Mostafa <kamal@canonical.com>
      f304cd83
  2. 11 Jun, 2015 27 commits