1. 17 Apr, 2015 8 commits
    • Bart Van Assche's avatar
      tcm_qla2xxx: Fix incorrect use of __transport_register_session · c4d66c92
      Bart Van Assche authored
      [ Upstream commit 75c3d0bf ]
      
      This patch fixes the incorrect use of __transport_register_session()
      in tcm_qla2xxx_check_initiator_node_acl() code, that does not perform
      explicit se_tpg->session_lock when accessing se_tpg->tpg_sess_list
      to add new se_sess nodes.
      
      Given that tcm_qla2xxx_check_initiator_node_acl() is not called with
      qla_hw->hardware_lock held for all accesses of ->tpg_sess_list, the
      code should be using transport_register_session() instead.
      Signed-off-by: default avatarBart Van Assche <bart.vanassche@sandisk.com>
      Cc: Giridhar Malavali <giridhar.malavali@qlogic.com>
      Cc: Quinn Tran <quinn.tran@qlogic.com>
      Cc: <stable@vger.kernel.org> # 3.5+
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
      Signed-off-by: default avatarSasha Levin <sasha.levin@oracle.com>
      c4d66c92
    • Dan Carpenter's avatar
      tcm_fc: missing curly braces in ft_invl_hw_context() · 2223d18c
      Dan Carpenter authored
      [ Upstream commit d556546e ]
      
      This patch adds a missing set of conditional check braces in
      ft_invl_hw_context() originally introduced by commit dcd998cc
      when handling DDP failures in ft_recv_write_data() code.
      
       commit dcd998cc
       Author: Kiran Patil <kiran.patil@intel.com>
       Date:   Wed Aug 3 09:20:01 2011 +0000
      
          tcm_fc: Handle DDP/SW fc_frame_payload_get failures in ft_recv_write_data
      Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Cc: Kiran Patil <kiran.patil@intel.com>
      Cc: <stable@vger.kernel.org> # 3.1+
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
      Signed-off-by: default avatarSasha Levin <sasha.levin@oracle.com>
      2223d18c
    • Yongbae Park's avatar
      clocksource: efm32: Fix a NULL pointer dereference · 3c6527a5
      Yongbae Park authored
      [ Upstream commit 7b8f10da ]
      
      The initialisation of the efm32 clocksource first sets up the irq and only
      after that initialises the data needed for irq handling. In case this
      initialisation is delayed the irq handler would dereference a NULL pointer.
      
      I'm not aware of anything that could delay the process in such a way, but it's
      better to be safe than sorry, so setup the irq only when the clock event device
      is ready.
      
      Cc: stable@vger.kernel.org
      Acked-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      Signed-off-by: default avatarYongbae Park <yongbae2@gmail.com>
      Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
      Signed-off-by: default avatarSasha Levin <sasha.levin@oracle.com>
      3c6527a5
    • Philipp Zabel's avatar
      regmap: introduce regmap_name to fix syscon regmap trace events · 5a0ed0a9
      Philipp Zabel authored
      [ Upstream commit c6b570d9 ]
      
      This patch fixes a NULL pointer dereference when enabling regmap event
      tracing in the presence of a syscon regmap, introduced by commit bdb0066d
      ("mfd: syscon: Decouple syscon interface from platform devices").
      That patch introduced syscon regmaps that have their dev field set to NULL.
      The regmap trace events expect it to point to a valid struct device and feed
      it to dev_name():
      
        $ echo 1 > /sys/kernel/debug/tracing/events/regmap/enable
      
        Unable to handle kernel NULL pointer dereference at virtual address 0000002c
        pgd = 80004000
        [0000002c] *pgd=00000000
        Internal error: Oops: 17 [#1] SMP ARM
        Modules linked in: coda videobuf2_vmalloc
        CPU: 0 PID: 304 Comm: kworker/0:2 Not tainted 4.0.0-rc2+ #9197
        Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree)
        Workqueue: events_freezable thermal_zone_device_check
        task: 9f25a200 ti: 9f1ee000 task.ti: 9f1ee000
        PC is at ftrace_raw_event_regmap_block+0x3c/0xe4
        LR is at _regmap_raw_read+0x1bc/0x1cc
        pc : [<803636e8>]    lr : [<80365f2c>]    psr: 600f0093
        sp : 9f1efd78  ip : 9f1efdb8  fp : 9f1efdb4
        r10: 00000004  r9 : 00000001  r8 : 00000001
        r7 : 00000180  r6 : 00000000  r5 : 9f00e3c0  r4 : 00000003
        r3 : 00000001  r2 : 00000180  r1 : 00000000  r0 : 9f00e3c0
        Flags: nZCv  IRQs off  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
        Control: 10c5387d  Table: 2d91004a  DAC: 00000015
        Process kworker/0:2 (pid: 304, stack limit = 0x9f1ee210)
        Stack: (0x9f1efd78 to 0x9f1f0000)
        fd60:                                                       9f1efda4 9f1efd88
        fd80: 800708c0 805f9510 80927140 800f0013 9f1fc800 9eb2f490 00000000 00000180
        fda0: 808e3840 00000001 9f1efdfc 9f1efdb8 80365f2c 803636b8 805f8958 800708e0
        fdc0: a00f0013 803636ac 9f16de00 00000180 80927140 9f1fc800 9f1fc800 9f1efe6c
        fde0: 9f1efe6c 9f732400 00000000 00000000 9f1efe1c 9f1efe00 80365f70 80365d7c
        fe00: 80365f3c 9f1fc800 9f1fc800 00000180 9f1efe44 9f1efe20 803656a4 80365f48
        fe20: 9f1fc800 00000180 9f1efe6c 9f1efe6c 9f732400 00000000 9f1efe64 9f1efe48
        fe40: 803657bc 80365634 00000001 9e95f910 9f1fc800 9f1efeb4 9f1efe8c 9f1efe68
        fe60: 80452ac0 80365778 9f1efe8c 9f1efe78 9e93d400 9e93d5e8 9f1efeb4 9f72ef40
        fe80: 9f1efeac 9f1efe90 8044e11c 80452998 8045298c 9e93d608 9e93d400 808e1978
        fea0: 9f1efecc 9f1efeb0 8044fd14 8044e0d0 ffffffff 9f25a200 9e93d608 9e481380
        fec0: 9f1efedc 9f1efed0 8044fde8 8044fcec 9f1eff1c 9f1efee0 80038d50 8044fdd8
        fee0: 9f1ee020 9f72ef40 9e481398 00000000 00000008 9f72ef54 9f1ee020 9f72ef40
        ff00: 9e481398 9e481380 00000008 9f72ef40 9f1eff5c 9f1eff20 80039754 80038bfc
        ff20: 00000000 9e481380 80894100 808e1662 00000000 9e4f2ec0 00000000 9e481380
        ff40: 800396f8 00000000 00000000 00000000 9f1effac 9f1eff60 8003e020 80039704
        ff60: ffffffff 00000000 ffffffff 9e481380 00000000 00000000 9f1eff78 9f1eff78
        ff80: 00000000 00000000 9f1eff88 9f1eff88 9e4f2ec0 8003df30 00000000 00000000
        ffa0: 00000000 9f1effb0 8000eb60 8003df3c 00000000 00000000 00000000 00000000
        ffc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
        ffe0: 00000000 00000000 00000000 00000000 00000013 00000000 ffffffff ffffffff
        Backtrace:
        [<803636ac>] (ftrace_raw_event_regmap_block) from [<80365f2c>] (_regmap_raw_read+0x1bc/0x1cc)
         r9:00000001 r8:808e3840 r7:00000180 r6:00000000 r5:9eb2f490 r4:9f1fc800
        [<80365d70>] (_regmap_raw_read) from [<80365f70>] (_regmap_bus_read+0x34/0x6c)
         r10:00000000 r9:00000000 r8:9f732400 r7:9f1efe6c r6:9f1efe6c r5:9f1fc800
         r4:9f1fc800
        [<80365f3c>] (_regmap_bus_read) from [<803656a4>] (_regmap_read+0x7c/0x144)
         r6:00000180 r5:9f1fc800 r4:9f1fc800 r3:80365f3c
        [<80365628>] (_regmap_read) from [<803657bc>] (regmap_read+0x50/0x70)
         r9:00000000 r8:9f732400 r7:9f1efe6c r6:9f1efe6c r5:00000180 r4:9f1fc800
        [<8036576c>] (regmap_read) from [<80452ac0>] (imx_get_temp+0x134/0x1a4)
         r6:9f1efeb4 r5:9f1fc800 r4:9e95f910 r3:00000001
        [<8045298c>] (imx_get_temp) from [<8044e11c>] (thermal_zone_get_temp+0x58/0x74)
         r7:9f72ef40 r6:9f1efeb4 r5:9e93d5e8 r4:9e93d400
        [<8044e0c4>] (thermal_zone_get_temp) from [<8044fd14>] (thermal_zone_device_update+0x34/0xec)
         r6:808e1978 r5:9e93d400 r4:9e93d608 r3:8045298c
        [<8044fce0>] (thermal_zone_device_update) from [<8044fde8>] (thermal_zone_device_check+0x1c/0x20)
         r5:9e481380 r4:9e93d608
        [<8044fdcc>] (thermal_zone_device_check) from [<80038d50>] (process_one_work+0x160/0x3d4)
        [<80038bf0>] (process_one_work) from [<80039754>] (worker_thread+0x5c/0x4f4)
         r10:9f72ef40 r9:00000008 r8:9e481380 r7:9e481398 r6:9f72ef40 r5:9f1ee020
         r4:9f72ef54
        [<800396f8>] (worker_thread) from [<8003e020>] (kthread+0xf0/0x108)
         r10:00000000 r9:00000000 r8:00000000 r7:800396f8 r6:9e481380 r5:00000000
         r4:9e4f2ec0
        [<8003df30>] (kthread) from [<8000eb60>] (ret_from_fork+0x14/0x34)
         r7:00000000 r6:00000000 r5:8003df30 r4:9e4f2ec0
        Code: e3140040 1a00001a e3140020 1a000016 (e596002c)
        ---[ end trace 193c15c2494ec960 ]---
      
      Fixes: bdb0066d (mfd: syscon: Decouple syscon interface from platform devices)
      Signed-off-by: default avatarPhilipp Zabel <p.zabel@pengutronix.de>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarSasha Levin <sasha.levin@oracle.com>
      5a0ed0a9
    • Lars-Peter Clausen's avatar
      regmap: regcache-rbtree: Fix present bitmap resize · 7ac888f3
      Lars-Peter Clausen authored
      [ Upstream commit 328f494d ]
      
      When inserting a new register into a block at the lower end the present
      bitmap is currently shifted into the wrong direction. The effect of this is
      that the bitmap becomes corrupted and registers which are present might be
      reported as not present and vice versa.
      
      Fix this by shifting left rather than right.
      
      Fixes: 472fdec7("regmap: rbtree: Reduce number of nodes, take 2")
      Reported-by: default avatarDaniel Baluta <daniel.baluta@gmail.com>
      Signed-off-by: default avatarLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarSasha Levin <sasha.levin@oracle.com>
      7ac888f3
    • Yongbae Park's avatar
      clockevents: sun5i: Fix setup_irq init sequence · 5820c59b
      Yongbae Park authored
      [ Upstream commit 1096be08 ]
      
      The interrupt is enabled before the handler is set. Even this bug
      did not appear, it is potentially dangerous as it can lead to a
      NULL pointer dereference.
      
      Fix the error by enabling the interrupt after
      clockevents_config_and_register() is called.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarYongbae Park <yongbae2@gmail.com>
      Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
      Signed-off-by: default avatarSasha Levin <sasha.levin@oracle.com>
      5820c59b
    • Michael S. Tsirkin's avatar
      virtio-balloon: do not call blocking ops when !TASK_RUNNING · c4369543
      Michael S. Tsirkin authored
      [ Upstream commit 3d2a3774 ]
      
      virtio balloon has this code:
              wait_event_interruptible(vb->config_change,
                                       (diff = towards_target(vb)) != 0
                                       || vb->need_stats_update
                                       || kthread_should_stop()
                                       || freezing(current));
      
      Which is a problem because towards_target() call might block after
      wait_event_interruptible sets task state to TAST_INTERRUPTIBLE, causing
      the task_struct::state collision typical of nesting of sleeping
      primitives
      
      See also http://lwn.net/Articles/628628/ or Thomas's
      bug report
      http://article.gmane.org/gmane.linux.kernel.virtualization/24846
      for a fuller explanation.
      
      To fix, rewrite using wait_woken.
      
      Cc: stable@vger.kernel.org
      Reported-by: default avatarThomas Huth <thuth@linux.vnet.ibm.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Tested-by: default avatarThomas Huth <thuth@linux.vnet.ibm.com>
      Reviewed-by: default avatarCornelia Huck <cornelia.huck@de.ibm.com>
      Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: default avatarSasha Levin <sasha.levin@oracle.com>
      c4369543
    • Peter Zijlstra's avatar
      sched/wait: Provide infrastructure to deal with nested blocking · 32384eff
      Peter Zijlstra authored
      [ Upstream commit 61ada528 ]
      
      There are a few places that call blocking primitives from wait loops,
      provide infrastructure to support this without the typical
      task_struct::state collision.
      
      We record the wakeup in wait_queue_t::flags which leaves
      task_struct::state free to be used by others.
      Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
      Reviewed-by: default avatarOleg Nesterov <oleg@redhat.com>
      Cc: tglx@linutronix.de
      Cc: ilya.dryomov@inktank.com
      Cc: umgwanakikbuti@gmail.com
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Link: http://lkml.kernel.org/r/20140924082242.051202318@infradead.orgSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      Signed-off-by: default avatarSasha Levin <sasha.levin@oracle.com>
      32384eff
  2. 09 Apr, 2015 17 commits
  3. 04 Apr, 2015 1 commit
  4. 28 Mar, 2015 14 commits