Skip to content
  1. Oct 23, 2013
    • Aaron Lu's avatar
      [SCSI] sd: call blk_pm_runtime_init before add_disk · 10c580e4
      Aaron Lu authored
      
      
      Sujit has found a race condition that would make q->nr_pending
      unbalanced, it occurs as Sujit explained:
      
      "
      sd_probe_async() ->
      	add_disk() ->
      		disk_add_event() ->
      			schedule(disk_events_workfn)
      	sd_revalidate_disk()
      	blk_pm_runtime_init()
      return;
      
      Let's say the disk_events_workfn() calls sd_check_events() which tries
      to send test_unit_ready() and because of sd_revalidate_disk() trying to
      send another commands the test_unit_ready() might be re-queued as the
      tagged command queuing is disabled.
      
      So the race condition is -
      
      Thread 1 			  |		Thread 2
      sd_revalidate_disk()		  |	sd_check_events()
      ...nr_pending = 0 as q->dev = NULL|	scsi_queue_insert()
      blk_runtime_pm_init()		  | 	blk_pm_requeue_request() ->
      				  |	nr_pending = -1 since
      				  |	q->dev != NULL
      "
      
      The problem is, the test_unit_ready request doesn't get counted the
      first time it is queued, so the later decrement of q->nr_pending in
      blk_pm_requeue_request makes it unbalanced.
      
      Fix this by calling blk_pm_runtime_init before add_disk so that all
      requests initiated there will all be counted.
      
      Signed-off-by: default avatarAaron Lu <aaron.lu@intel.com>
      Reported-and-tested-by: default avatarSujit Reddy Thumma <sthumma@codeaurora.org>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarJames Bottomley <JBottomley@Parallels.com>
      10c580e4
    • Chad Dupuis's avatar
      [SCSI] qla2xxx: Fix request queue null dereference. · 36008cf1
      Chad Dupuis authored
      
      
      If an invalid IOCB is returned on the response queue then the index into the
      request queue map could be invalid and could return to us a bogus value. This
      could cause us to try to deference an invalid pointer and cause an exception.
      
      If we encounter this condition, simply return as no context can be established
      for this response.
      
      Signed-off-by: default avatarChad Dupuis <chad.dupuis@qlogic.com>
      Signed-off-by: default avatarSaurav Kashyap <saurav.kashyap@qlogic.com>
      Signed-off-by: default avatarJames Bottomley <JBottomley@Parallels.com>
      36008cf1
  2. Oct 16, 2013
    • Khalid Aziz's avatar
      [SCSI] BusLogic: Fix an oops when intializing multimaster adapter · 6541932e
      Khalid Aziz authored
      
      
      This fixes an oops caused by buslogic driver when initializing a BusLogic
      MultiMaster adapter. Initialization code used scope of a variable
      incorrectly which created a NULL pointer. Oops message is below:
      
      BUG: unable to handle kernel NULL pointer dereference at 0000000c
      IP: [<c150c137>] blogic_init_mm_probeinfo.isra.17+0x20a/0x583
      *pde = 00000000
      Oops: 002 [#1] PREEMPT SMP
      Modules linked in:
      CPU: 1 PID: 1 Comm: swapper/0 Not tainted 3.11.1.puz1 #1
      Hardware name:    /Canterwood, BIOS 6.00 PG 05/16/2003
      task: f7050000 ti: f7054000 task.ti: f7054000
      EIP: 0060:[<c150c137>] EFLAGS: 00010246 CPU:1
      EIP is at blogic_init_mm_probeinfo.isra.17+0x20a/0x583
      EAX: 00000013 EBX: 00000000 ECX: 00000000 EDX: f8001000
      ESI: f71cb800 EDI: f7388000 EBP: 00007800 ESP: f7055c84
       DS: 007b ES: 007b FS: 00d8 GS: 0000 SS: 0068
      CR0: 8005003b CR2: 0000000c CR3: 0154f000 CR4: 000007d0
      Stack:
       0000001c 00000000 c11a59f6 f7055c98 00008130 ffffffff ffffffff 00000000
       00000003 00000000 00000000 00000000 00000013 f8001000 00000001 000003d0
       00000000 00000000 00000000 c14e3f84 f78803c8 00000000 f738c000 000000e9
      Call Trace:
       [<c11a59f6>] ? pci_get_subsys+0x33/0x38
       [<c150c4fb>] ? blogic_init_probeinfo_list+0x4b/0x19e
       [<c108d593>] ? __alloc_pages_nodemask+0xe3/0x623
       [<c108d593>] ? __alloc_pages_nodemask+0xe3/0x623
       [<c10fb99e>] ? sysfs_link_sibling+0x61/0x8d
       [<c10b0519>] ? kmem_cache_alloc+0x8b/0xb5
       [<c150cce5>] ? blogic_init+0xa1/0x10e8
       [<c10fc0a8>] ? sysfs_add_one+0x10/0x9d
       [<c10fc18a>] ? sysfs_addrm_finish+0x12/0x85
       [<c10fca37>] ? sysfs_do_create_link_sd+0x9d/0x1b4
       [<c117c272>] ? blk_register_queue+0x69/0xb3
       [<c10fcb68>] ? sysfs_create_link+0x1a/0x2c
       [<c1181a07>] ? add_disk+0x1a1/0x3c7
       [<c138737b>] ? klist_next+0x60/0xc3
       [<c122cc3a>] ? scsi_dh_detach+0x68/0x68
       [<c1213e36>] ? bus_for_each_dev+0x51/0x61
       [<c1000356>] ? do_one_initcall+0x22/0x12c
       [<c10f3688>] ? __proc_create+0x8c/0xba
       [<c150cc44>] ? blogic_setup+0x5f6/0x5f6
       [<c14e94aa>] ? repair_env_string+0xf/0x4d
       [<c14e949b>] ? do_early_param+0x71/0x71
       [<c103efaa>] ? parse_args+0x21f/0x33d
       [<c14e9a54>] ? kernel_init_freeable+0xdf/0x17d
       [<c14e949b>] ? do_early_param+0x71/0x71
       [<c1388b64>] ? kernel_init+0x8/0xc0
       [<c1392222>] ? ret_from_kernel_thread+0x6/0x28
       [<c1392227>] ? ret_from_kernel_thread+0x1b/0x28
       [<c1388b5c>] ? rest_init+0x6c/0x6c
      Code: 89 44 24 10 0f b6 44 24 3d 89 44 24 0c c7 44 24 08 00 00 00 00 c7 44 24 04 38 62 46 c1 c7 04 24 02 00 00 00 e8 78 13 d2 ff 31 db <89> 6b 0c b0 20 89 ea ee
       c7 44 24 08 04 00 00 00 8d 44 24 4c 89
      EIP: [<c150c137>] blogic_init_mm_probeinfo.isra.17+0x20a/0x583 SS:ESP 0068:f7055c84
      CR2: 000000000000000c
      ---[ end trace 17f45f5196d40487 ]---
      Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000009
      
      Signed-off-by: default avatarKhalid Aziz <khalid.aziz@oracle.com>
      Cc: <stable@vger.kernel.org> # 3.11.x
      Reported-by: default avatarPierre Uszynski <pierre@rahul.net>
      Tested-by: default avatarPierre Uszynski <pierre@rahul.net>
      Signed-off-by: default avatarJames Bottomley <JBottomley@Parallels.com>
      6541932e
  3. Oct 14, 2013
    • Linus Torvalds's avatar
      Linux 3.12-rc5 · 61e6cfa8
      Linus Torvalds authored
      61e6cfa8
    • Linus Torvalds's avatar
      Merge git://www.linux-watchdog.org/linux-watchdog · 73cac03d
      Linus Torvalds authored
      Pull watchdog fixes from Wim Van Sebroeck:
       "This will fix a deadlock on the ts72xx_wdt driver, fix bitmasks in the
        kempld_wdt driver and fix a section mismatch in the sunxi_wdt driver"
      
      * git://www.linux-watchdog.org/linux-watchdog:
        watchdog: sunxi: Fix section mismatch
        watchdog: kempld_wdt: Fix bit mask definition
        watchdog: ts72xx_wdt: locking bug in ioctl
      73cac03d
    • Maxime Ripard's avatar
      watchdog: sunxi: Fix section mismatch · 1d5898b4
      Maxime Ripard authored
      
      
      This driver has a section mismatch, for probe and remove functions,
      leading to the following warning during the compilation.
      
      WARNING: drivers/watchdog/built-in.o(.data+0x24): Section mismatch in
      reference from the variable sunxi_wdt_driver to the function
      .init.text:sunxi_wdt_probe()
      The variable sunxi_wdt_driver references
      the function __init sunxi_wdt_probe()
      
      Signed-off-by: default avatarMaxime Ripard <maxime.ripard@free-electrons.com>
      Reviewed-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: default avatarWim Van Sebroeck <wim@iguana.be>
      1d5898b4
    • Jingoo Han's avatar
      watchdog: kempld_wdt: Fix bit mask definition · 4c4e4566
      Jingoo Han authored
      
      
      STAGE_CFG bits are defined as [5:4] bits. However, '(((x) & 0x30) << 4)'
      handles [9:8] bits. Thus, it should be fixed in order to handle
      [5:4] bits.
      
      Signed-off-by: default avatarJingoo Han <jg1.han@samsung.com>
      Reviewed-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: default avatarWim Van Sebroeck <wim@iguana.be>
      4c4e4566
    • Dan Carpenter's avatar
      watchdog: ts72xx_wdt: locking bug in ioctl · 8612ed0d
      Dan Carpenter authored
      
      
      Calling the WDIOC_GETSTATUS & WDIOC_GETBOOTSTATUS and twice will cause a
      interruptible deadlock.
      
      Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Reviewed-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: default avatarWim Van Sebroeck <wim@iguana.be>
      8612ed0d
    • Linus Torvalds's avatar
      Merge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc · 3552570a
      Linus Torvalds authored
      Pull ARM SoC fixes from Olof Johansson:
       "A small batch of fixes this week, mostly OMAP related.  Nothing stands
        out as particularly controversial.
      
        Also a fix for a 3.12-rc1 timer regression for Exynos platforms,
        including the Chromebooks"
      
      * tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
        ARM: exynos: dts: Update 5250 arch timer node with clock frequency
        ARM: OMAP2: RX-51: Add missing max_current to rx51_lp5523_led_config
        ARM: mach-omap2: board-generic: fix undefined symbol
        ARM: dts: Fix pinctrl mask for omap3
        ARM: OMAP3: Fix hardware detection for omap3630 when booted with device tree
        ARM: OMAP2: gpmc-onenand: fix sync mode setup with DT
      3552570a
    • Yuvaraj Kumar C D's avatar
      ARM: exynos: dts: Update 5250 arch timer node with clock frequency · 4d594dd3
      Yuvaraj Kumar C D authored
      
      
      Without the "clock-frequency" property in arch timer node, could able
      to see the below crash dump.
      
      [<c0014e28>] (unwind_backtrace+0x0/0xf4) from [<c0011808>] (show_stack+0x10/0x14)
      [<c0011808>] (show_stack+0x10/0x14) from [<c036ac1c>] (dump_stack+0x7c/0xb0)
      [<c036ac1c>] (dump_stack+0x7c/0xb0) from [<c01ab760>] (Ldiv0_64+0x8/0x18)
      [<c01ab760>] (Ldiv0_64+0x8/0x18) from [<c0062f60>] (clockevents_config.part.2+0x1c/0x74)
      [<c0062f60>] (clockevents_config.part.2+0x1c/0x74) from [<c0062fd8>] (clockevents_config_and_register+0x20/0x2c)
      [<c0062fd8>] (clockevents_config_and_register+0x20/0x2c) from [<c02b8e8c>] (arch_timer_setup+0xa8/0x134)
      [<c02b8e8c>] (arch_timer_setup+0xa8/0x134) from [<c04b47b4>] (arch_timer_init+0x1f4/0x24c)
      [<c04b47b4>] (arch_timer_init+0x1f4/0x24c) from [<c04b40d8>] (clocksource_of_init+0x34/0x58)
      [<c04b40d8>] (clocksource_of_init+0x34/0x58) from [<c049ed8c>] (time_init+0x20/0x2c)
      [<c049ed8c>] (time_init+0x20/0x2c) from [<c049b95c>] (start_kernel+0x1e0/0x39c)
      
      THis is because the Exynos u-boot, for example on the Chromebooks, doesn't set
      up the CNTFRQ register as expected by arch_timer. Instead, we have to specify
      the frequency in the device tree like this.
      
      Signed-off-by: default avatarYuvaraj Kumar C D <yuvaraj.cd@samsung.com>
      [olof: Changed subject, added comment, elaborated on commit message]
      Signed-off-by: default avatarOlof Johansson <olof@lixom.net>
      4d594dd3
    • Olof Johansson's avatar
      Merge tag 'fixes-against-v3.12-rc3-take2' of... · 98ead6e0
      Olof Johansson authored
      
      Merge tag 'fixes-against-v3.12-rc3-take2' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into fixes
      
      From Tony Lindgren:
      
      Few fixes for omap3 related hangs and errors that people have
      noticed now that people are actually using the device tree
      based booting for omap3.
      
      Also one regression fix for timer compile for dra7xx when
      omap5 is not selected, and a LED regression fix for n900.
      
      * tag 'fixes-against-v3.12-rc3-take2' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
        ARM: OMAP2: RX-51: Add missing max_current to rx51_lp5523_led_config
        ARM: mach-omap2: board-generic: fix undefined symbol
        ARM: dts: Fix pinctrl mask for omap3
        ARM: OMAP3: Fix hardware detection for omap3630 when booted with device tree
        ARM: OMAP2: gpmc-onenand: fix sync mode setup with DT
      
      Signed-off-by: default avatarOlof Johansson <olof@lixom.net>
      98ead6e0
    • Linus Torvalds's avatar
      Merge branch 'parisc-3.12' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux · 2d4712b7
      Linus Torvalds authored
      Pull parisc fixes from Helge Deller:
       "This patchset includes a bugfix to prevent a kernel crash when memory
        in page zero is accessed by the kernel itself, e.g.  via
        probe_kernel_read().
      
        Furthermore we now export flush_cache_page() which is needed
        (indirectly) by the lustre filesystem.  The other patches remove
        unused functions and optimizes the page fault handler to only evaluate
        variables if needed, which again protects against possible kernel
        crashes"
      
      * 'parisc-3.12' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
        parisc: let probe_kernel_read() capture access to page zero
        parisc: optimize variable initialization in do_page_fault
        parisc: fix interruption handler to respect pagefault_disable()
        parisc: mark parisc_terminate() noreturn and cold.
        parisc: remove unused syscall_ipi() function.
        parisc: kill SMP single function call interrupt
        parisc: Export flush_cache_page() (needed by lustre)
      2d4712b7
    • Linus Torvalds's avatar
      Merge branch 'fixes' of git://git.infradead.org/users/vkoul/slave-dma · 75c53188
      Linus Torvalds authored
      Pull slave-dmaengine fixes from Vinod Koul:
       "Another week, time to send another fixes request taking time out of
        extended weekend for the festivities in this part of the world.
      
        We have two fixes from Sergei for rcar driver and one fixing memory
        leak of edma driver by Geyslan"
      
      * 'fixes' of git://git.infradead.org/users/vkoul/slave-dma:
        dma: edma.c: remove edma_desc leakage
        rcar-hpbdma: add parameter to set_slave() method
        rcar-hpbdma: remove shdma_free_irq() calls
      75c53188
  4. Oct 13, 2013
  5. Oct 12, 2013
    • Vineet Gupta's avatar
      ARC: Ignore ptrace SETREGSET request for synthetic register "stop_pc" · 5b242828
      Vineet Gupta authored
      
      
      ARCompact TRAP_S insn used for breakpoints, commits before exception is
      taken (updating architectural PC). So ptregs->ret contains next-PC and
      not the breakpoint PC itself. This is different from other restartable
      exceptions such as TLB Miss where ptregs->ret has exact faulting PC.
      gdb needs to know exact-PC hence ARC ptrace GETREGSET provides for
      @stop_pc which returns ptregs->ret vs. EFA depending on the
      situation.
      
      However, writing stop_pc (SETREGSET request), which updates ptregs->ret
      doesn't makes sense stop_pc doesn't always correspond to that reg as
      described above.
      
      This was not an issue so far since user_regs->ret / user_regs->stop_pc
      had same value and both writing to ptregs->ret was OK, needless, but NOT
      broken, hence not observed.
      
      With gdb "jump", they diverge, and user_regs->ret updating ptregs is
      overwritten immediately with stop_pc, which this patch fixes.
      
      Reported-by: default avatarAnton Kolesov <akolesov@synopsys.com>
      Signed-off-by: default avatarVineet Gupta <vgupta@synopsys.com>
      5b242828
    • Linus Torvalds's avatar
      Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus · 46f37519
      Linus Torvalds authored
      Pull MIPS fix from Ralf Baechle:
       "Just one fix.  The stack protector was loading the value of the canary
        instead of its address"
      
      * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus:
        MIPS: stack protector: Fix per-task canary switch
      46f37519
    • Linus Torvalds's avatar
      Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux · cd4edf7a
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "All over the map..
      
         - nouveau:
           disable MSI, needs more work, will try again next merge window
         - radeon:
            audio + uvd regression fixes, dpm fixes, reset fixes
         - i915:
           the dpms fix might fix your haswell
      
        And one pain in the ass revert, so we have VGA arbitration that when
        implemented 4-5 years ago really hoped that GPUs could remove
        themselves from arbitration completely once they had a kernel driver.
      
        It seems Intel hw designers decided that was too nice a facility to
        allow us to have so they removed it when they went on-die (so since
        Ironlake at least).  Now Alex Williamson added support for VGA
        arbitration for newer GPUs however this now exposes itself to
        userspace as requireing arbitration of GPU VGA regions and the X
        server gets involved and disables things that it can't handle when VGA
        access is possibly required around every operation.
      
        So in order to not break userspace we just reverted things back to the
        old known broken status so maybe we can try and design out way out.
      
        Ville also had a patch to use stop machine for the two times Intel
        needs to access VGA space, that might be acceptable with some rework,
        but for now myself and Daniel agreed to just go back"
      
      * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: (23 commits)
        Revert "i915: Update VGA arbiter support for newer devices"
        Revert "drm/i915: Delay disabling of VGA memory until vgacon->fbcon handoff is done"
        drm/radeon: re-enable sw ACR support on pre-DCE4
        drm/radeon/dpm: disable bapm on TN asics
        drm/radeon: improve soft reset on CIK
        drm/radeon: improve soft reset on SI
        drm/radeon/dpm: off by one in si_set_mc_special_registers()
        drm/radeon/dpm/btc: off by one in btc_set_mc_special_registers()
        drm/radeon: forever loop on error in radeon_do_test_moves()
        drm/radeon: fix hw contexts for SUMO2 asics
        drm/radeon: fix typo in CP DMA register headers
        drm/radeon/dpm: disable multiple UVD states
        drm/radeon: use hw generated CTS/N values for audio
        drm/radeon: fix N/CTS clock matching for audio
        drm/radeon: use 64-bit math to calculate CTS values for audio (v2)
        drm/edid: catch kmalloc failure in drm_edid_to_speaker_allocation
        Revert "drm/fb-helper: don't sleep for screen unblank when an oops is in progress"
        drm/gma500: fix things after get/put page helpers
        drm/nouveau/mc: disable msi support by default, it's busted in tons of places
        drm/i915: Only apply DPMS to the encoder if enabled
        ...
      cd4edf7a
  6. Oct 11, 2013