1. 18 11月, 2016 2 次提交
  2. 31 10月, 2016 1 次提交
    • B
      drm/i2c: tda998x: mali-dp: hdlcd: refactor connector registration · 90731c24
      Brian Starkey 提交于
      Connectors shouldn't be registered until the rest of the whole device
      is set up, so that consistent state is presented to userspace.
      
      As such, remove the calls to drm_connector_register() and
      drm_connector_unregister() from tda998x, as these are now handled by
      drm_dev_(un)register() itself.
      
      To work with this change, the mali-dp and hdlcd bind and unbind
      sequences have to be reordered, to ensure that the componentised
      encoder/connector is bound before drm_dev_register() registers all
      connectors. Similarly, the device must be unregistered before the
      component is unbound.
      
      Altogether, this allows other drivers using tda998x to be
      de-midlayered, and to have less racy initialisation of their components.
      
      Splitting this commit into three (one per driver) isn't possible without
      intermediate breakage, so it is all squashed together here.
      Suggested-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      Signed-off-by: NBrian Starkey <brian.starkey@arm.com>
      Reviewed-by: NLiviu Dudau <Liviu.Dudau@arm.com>
      Signed-off-by: NRussell King <rmk+kernel@armlinux.org.uk>
      90731c24
  3. 30 9月, 2016 1 次提交
    • M
      tg3: Avoid NULL pointer dereference in tg3_io_error_detected() · 1b0ff898
      Milton Miller 提交于
      While the driver is probing the adapter, an error may occur before the
      netdev structure is allocated and attached to pci_dev. In this case,
      not only netdev isn't available, but the tg3 private structure is also
      not available as it is just math from the NULL pointer, so dereferences
      must be skipped.
      
      The following trace is seen when the error is triggered:
      
        [1.402247] Unable to handle kernel paging request for data at address 0x00001a99
        [1.402410] Faulting instruction address: 0xc0000000007e33f8
        [1.402450] Oops: Kernel access of bad area, sig: 11 [#1]
        [1.402481] SMP NR_CPUS=2048 NUMA PowerNV
        [1.402513] Modules linked in:
        [1.402545] CPU: 0 PID: 651 Comm: eehd Not tainted 4.4.0-36-generic #55-Ubuntu
        [1.402591] task: c000001fe4e42a20 ti: c000001fe4e88000 task.ti: c000001fe4e88000
        [1.402742] NIP: c0000000007e33f8 LR: c0000000007e3164 CTR: c000000000595ea0
        [1.402787] REGS: c000001fe4e8b790 TRAP: 0300   Not tainted  (4.4.0-36-generic)
        [1.402832] MSR: 9000000100009033 <SF,HV,EE,ME,IR,DR,RI,LE>  CR: 28000422  XER: 20000000
        [1.403058] CFAR: c000000000008468 DAR: 0000000000001a99 DSISR: 42000000 SOFTE: 1
        GPR00: c0000000007e3164 c000001fe4e8ba10 c0000000015c5e00 0000000000000000
        GPR04: 0000000000000001 0000000000000000 0000000000000039 0000000000000299
        GPR08: 0000000000000000 0000000000000001 c000001fe4e88000 0000000000000006
        GPR12: 0000000000000000 c00000000fb40000 c0000000000e6558 c000003ca1bffd00
        GPR16: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
        GPR20: 0000000000000000 0000000000000000 0000000000000000 c000000000d52768
        GPR24: c000000000d52740 0000000000000100 c000003ca1b52000 0000000000000002
        GPR28: 0000000000000900 0000000000000000 c00000000152a0c0 c000003ca1b52000
        [1.404226] NIP [c0000000007e33f8] tg3_io_error_detected+0x308/0x340
        [1.404265] LR [c0000000007e3164] tg3_io_error_detected+0x74/0x340
      
      This patch avoids the NULL pointer dereference by moving the access after
      the netdev NULL pointer check on tg3_io_error_detected(). Also, we add a
      check for netdev being NULL on tg3_io_resume() [suggested by Michael Chan].
      
      Fixes: 0486a063 ("tg3: prevent ifup/ifdown during PCI error recovery")
      Fixes: dfc8f370 ("net/tg3: Release IRQs on permanent error")
      Tested-by: NGuilherme G. Piccoli <gpiccoli@linux.vnet.ibm.com>
      Signed-off-by: NMilton Miller <miltonm@us.ibm.com>
      Signed-off-by: NGuilherme G. Piccoli <gpiccoli@linux.vnet.ibm.com>
      Acked-by: NMichael Chan <michael.chan@broadcom.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1b0ff898
  4. 28 9月, 2016 3 次提交
  5. 27 9月, 2016 6 次提交
    • F
      Revert "net: ethernet: bcmgenet: use phydev from struct net_device" · bf1a85a8
      Florian Fainelli 提交于
      This reverts commit 62469c76 ("net: ethernet: bcmgenet: use phydev
      from struct net_device") because it causes GENETv1/2/3 adapters to
      expose the following behavior after an ifconfig down/up sequence:
      
      PING fainelli-linux (10.112.156.244): 56 data bytes
      64 bytes from 10.112.156.244: seq=1 ttl=61 time=1.352 ms
      64 bytes from 10.112.156.244: seq=1 ttl=61 time=1.472 ms (DUP!)
      64 bytes from 10.112.156.244: seq=1 ttl=61 time=1.496 ms (DUP!)
      64 bytes from 10.112.156.244: seq=1 ttl=61 time=1.517 ms (DUP!)
      64 bytes from 10.112.156.244: seq=1 ttl=61 time=1.536 ms (DUP!)
      64 bytes from 10.112.156.244: seq=1 ttl=61 time=1.557 ms (DUP!)
      64 bytes from 10.112.156.244: seq=1 ttl=61 time=752.448 ms (DUP!)
      
      This was previously fixed by commit 5dbebbb4 ("net: bcmgenet:
      Software reset EPHY after power on") but the commit we are reverting was
      essentially making this previous commit void, here is why.
      
      Without commit 62469c76 we would have the following scenario after
      an ifconfig down then up sequence:
      
      - bcmgenet_open() calls bcmgenet_power_up() to make sure the PHY is
        initialized *before* we get to initialize the UniMAC, this is
        critical to ensure the PHY is in a correct state, priv->phydev is
        valid, this code executes fine
      
      - second time from bcmgenet_mii_probe(), through the normal
        phy_init_hw() call (which arguably could be optimized out)
      
      Everything is fine in that case. With commit 62469c76, we would have
      the following scenario to happen after an ifconfig down then up
      sequence:
      
      - bcmgenet_close() calls phy_disonnect() which makes dev->phydev become
        NULL
      
      - when bcmgenet_open() executes again and calls bcmgenet_mii_reset() from
        bcmgenet_power_up() to initialize the internal PHY, the NULL check
        becomes true, so we do not reset the PHY, yet we keep going on and
        initialize the UniMAC, causing MAC activity to occur
      
      - we call bcmgenet_mii_reset() from bcmgenet_mii_probe(), but this is
        too late, the PHY is botched, and causes the above bogus pings/packets
        transmission/reception to occur
      Reported-by: NJaedon Shin <jaedon.shin@gmail.com>
      Signed-off-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      bf1a85a8
    • E
      net: fec: align IP header in hardware · 3ac72b7b
      Eric Nelson 提交于
      The FEC receive accelerator (RACC) supports shifting the data payload of
      received packets by 16-bits, which aligns the payload (IP header) on a
      4-byte boundary, which is, if not required, at least strongly suggested
      by the Linux networking layer.
      
      Without this patch, a huge number of alignment faults will be taken by the
      IP stack, as seen in /proc/cpu/alignment:
      
      	~/$ cat /proc/cpu/alignment
      	User:		0
      	System:		72645 (inet_gro_receive+0x104/0x27c)
      	Skipped:	0
      	Half:		0
      	Word:		0
      	DWord:		0
      	Multi:		72645
      	User faults:	3 (fixup+warn)
      
      This patch was suggested by Andrew Lunn in this message to linux-netdev:
      	http://marc.info/?l=linux-arm-kernel&m=147465452108384&w=2
      
      and adapted from a patch by Russell King from 2014:
      	http://git.arm.linux.org.uk/cgit/linux-arm.git/commit/?id=70d8a8aSigned-off-by: NEric Nelson <eric@nelint.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3ac72b7b
    • E
      net: fec: remove QUIRK_HAS_RACC from i.mx27 · 97dc499c
      Eric Nelson 提交于
      According to the i.MX27 reference manual, this SoC does not have support
      for the receive accelerator (RACC) register at offset 0x1C4.
      
      	http://cache.nxp.com/files/32bit/doc/ref_manual/MCIMX27RM.pdfSigned-off-by: NEric Nelson <eric@nelint.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      97dc499c
    • E
      net: fec: remove QUIRK_HAS_RACC from i.mx25 · 653d37d8
      Eric Nelson 提交于
      According to the i.MX25 reference manual, this SoC does not have support
      for the receive accelerator (RACC) register at offset 0x1C4.
      
      http://www.nxp.com/files/dsp/doc/ref_manual/IMX25RM.pdfSigned-off-by: NEric Nelson <eric@nelint.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      653d37d8
    • V
      Input: joydev - recognize devices with Z axis as joysticks · 9fb6de1b
      Ville Ranki 提交于
      Current implementation of joydev's input_device_id table recognizes only
      devices with ABS_X, ABS_WHEEL or ABS_THROTTLE axes as joysticks.
      
      There are joystick devices that do not have those axes, for example TRC
      Rudder device. The device in question has ABS_Z, ABS_RX and ABS_RY axes
      causing it not being detected as joystick.
      
      This patch adds ABS_Z to the input_device_id list allowing devices with
      ABS_Z axis to be detected correctly.
      Signed-off-by: NVille Ranki <ville.ranki@iki.fi>
      Signed-off-by: NDmitry Torokhov <dmitry.torokhov@gmail.com>
      9fb6de1b
    • B
      scsi: Avoid that toggling use_blk_mq triggers a memory leak · 8d58881b
      Bart Van Assche 提交于
      This patch avoids that the following memory leak is triggered if
      use_blk_mq is disabled after a SCSI host has been allocated by the
      ib_srp driver and before the same SCSI host is freed:
      
      unreferenced object 0xffff8803a168c568 (size 256):
        backtrace:
          [<ffffffff81620c95>] kmemleak_alloc+0x45/0xa0
          [<ffffffff811bb104>] __kmalloc_node+0x1e4/0x400
          [<ffffffff81309fe4>] blk_mq_alloc_tag_set+0xb4/0x230
          [<ffffffff814731b7>] scsi_mq_setup_tags+0xc7/0xd0
          [<ffffffff81469c26>] scsi_add_host_with_dma+0x216/0x2d0
          [<ffffffffa064bef5>] srp_create_target+0xe55/0x13d0 [ib_srp]
          [<ffffffff8143ce23>] dev_attr_store+0x13/0x20
          [<ffffffff8125f030>] sysfs_kf_write+0x40/0x50
          [<ffffffff8125e397>] kernfs_fop_write+0x137/0x1c0
          [<ffffffff811d8c13>] __vfs_write+0x23/0x140
          [<ffffffff811d92e0>] vfs_write+0xb0/0x190
          [<ffffffff811da5b4>] SyS_write+0x44/0xa0
          [<ffffffff8162c8a5>] entry_SYSCALL_64_fastpath+0x18/0xa8
      
      Fixes: 9aa9cc42 ("scsi: remove the disable_blk_mq host flag")
      Signed-off-by: NBart Van Assche <bart.vanassche@sandisk.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Martin K. Petersen <martin.petersen@oracle.com>
      Cc: <stable@vger.kernel.org>
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
      8d58881b
  6. 25 9月, 2016 1 次提交
  7. 23 9月, 2016 2 次提交
  8. 22 9月, 2016 10 次提交
  9. 21 9月, 2016 8 次提交
    • M
      net: can: ifi: Configure transmitter delay · 8d58790b
      Marek Vasut 提交于
      Configure the transmitter delay register at +0x1c to correctly handle
      the CAN FD bitrate switch (BRS). This moves the SSP (secondary sample
      point) to a proper offset, so that the TDC mechanism works and won't
      generate error frames on the CAN link.
      Signed-off-by: NMarek Vasut <marex@denx.de>
      Cc: Marc Kleine-Budde <mkl@pengutronix.de>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Oliver Hartkopp <socketcan@hartkopp.net>
      Cc: Wolfgang Grandegger <wg@grandegger.com>
      Cc: linux-stable <stable@vger.kernel.org>
      Signed-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
      8d58790b
    • H
      r8152: disable ALDPS and EEE before setting PHY · d768c61b
      hayeswang 提交于
      Disable ALDPS and EEE to avoid the possible failure when setting the PHY.
      Signed-off-by: NHayes Wang <hayeswang@realtek.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d768c61b
    • H
      r8152: remove r8153_enable_eee · af0287ec
      hayeswang 提交于
      Remove r8153_enable_eee().
      Signed-off-by: NHayes Wang <hayeswang@realtek.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      af0287ec
    • H
      r8152: move PHY settings to hw_phy_cfg · ef39df8e
      hayeswang 提交于
      Move the PHY relative settings together to hw_phy_cfg().
      Signed-off-by: NHayes Wang <hayeswang@realtek.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ef39df8e
    • H
      r8152: move enabling PHY · 2dd436da
      hayeswang 提交于
      Move enabling PHY to init(), otherwise some other settings may fail.
      Signed-off-by: NHayes Wang <hayeswang@realtek.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2dd436da
    • H
      r8152: move some functions · e6449539
      hayeswang 提交于
      Move the following functions forward.
      
      	r8152_mmd_indirect()
      	r8152_mmd_read()
      	r8152_mmd_write()
      	r8152_eee_en()
      	r8152b_enable_eee()
      	r8153_eee_en()
      	r8153_enable_eee()
      	r8152b_enable_fc()
      	r8153_aldps_en()
      Signed-off-by: NHayes Wang <hayeswang@realtek.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e6449539
    • H
      cxgb4/cxgb4vf: Allocate more queues for 25G and 100G adapter · 9b86a8d1
      Hariprasad Shenai 提交于
      We were missing check for 25G and 100G while checking port speed,
      which lead to less number of queues getting allocated for 25G & 100G
      adapters and leading to low throughput. Adding the missing check for
      both NIC and vNIC driver.
      
      Also fixes port advertisement for 25G and 100G in ethtool output.
      Signed-off-by: NHariprasad Shenai <hariprasad@chelsio.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9b86a8d1
    • P
      irqchip/mips-gic: Fix local interrupts · e875bd66
      Paul Burton 提交于
      Since the device hierarchy domain was added by commit c98c1822
      ("irqchip/mips-gic: Add device hierarchy domain"), GIC local interrupts
      have been broken.
      
      Users attempting to setup a per-cpu local IRQ, for example the GIC timer
      clock events code in drivers/clocksource/mips-gic-timer.c, the
      setup_percpu_irq function would refuse with -EINVAL because the GIC
      irqchip driver never called irq_set_percpu_devid so the
      IRQ_PER_CPU_DEVID flag was never set for the IRQ. This happens because
      irq_set_percpu_devid was being called from the gic_irq_domain_map
      function which is no longer called.
      
      Doing only that runs into further problems because gic_dev_domain_alloc
      set the struct irq_chip for all interrupts, local or shared, to
      gic_level_irq_controller despite that only being suitable for shared
      interrupts. The typical outcome of this is that gic_level_irq_controller
      callback functions are called for local interrupts, and then hwirq
      number calculations overflow & the driver ends up attempting to access
      some invalid register with an address calculated from an invalid hwirq
      number. Best case scenario is that this then leads to a bus error. This
      is fixed by abstracting the setup of the hwirq & chip to a new function
      gic_setup_dev_chip which is used by both the root GIC IRQ domain & the
      device domain.
      
      Finally, decoding local interrupts failed because gic_dev_domain_alloc
      only called irq_domain_alloc_irqs_parent for shared interrupts. Local
      ones were therefore never associated with hwirqs in the root GIC IRQ
      domain and the virq in gic_handle_local_int would always be 0. This is
      fixed by calling irq_domain_alloc_irqs_parent unconditionally & having
      gic_irq_domain_alloc handle both local & shared interrupts, which is
      easy due to the aforementioned abstraction of chip setup into
      gic_setup_dev_chip.
      
      This fixes use of the MIPS GIC timer for clock events, which has been
      broken since c98c1822 ("irqchip/mips-gic: Add device hierarchy
      domain") but hadn't been noticed due to a silent fallback to the MIPS
      coprocessor 0 count/compare clock events device.
      
      Fixes: c98c1822 ("irqchip/mips-gic: Add device hierarchy domain")
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: Jason Cooper <jason@lakedaemon.net>
      Cc: Qais Yousef <qsyousef@gmail.com>
      Cc: stable@vger.kernel.org
      Cc: Marc Zyngier <marc.zyngier@arm.com>
      Link: http://lkml.kernel.org/r/20160913165335.31389-1-paul.burton@imgtec.comSigned-off-by: NThomas Gleixner <tglx@linutronix.de>
      e875bd66
  10. 20 9月, 2016 6 次提交
    • Y
      qed: Fix stack corruption on probe · 67a99b70
      Yuval Mintz 提交于
      Commit fe56b9e6 ("qed: Add module with basic common support")
      has introduced a stack corruption during probe, where filling a
      local struct with data to be sent to management firmware is incorrectly
      filled; The data is written outside of the struct and corrupts
      the stack.
      
      Changes from v1:
      ----------------
       - Correct the value written [Caught by David Laight]
      
      Fixes: fe56b9e6 ("qed: Add module with basic common support")
      Signed-off-by: NYuval Mintz <Yuval.Mintz@caviumnetworks.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      67a99b70
    • O
      net/mlx5: E-Switch, Handle mode change failures · 6c419ba8
      Or Gerlitz 提交于
      E-switch mode changes involve creating HW tables, potentially allocating
      netdevices, etc, and things can fail. Add an attempt to rollback to the
      existing mode when changing to the new mode fails. Only if rollback fails,
      getting proper SRIOV functionality requires module unload or sriov
      disablement/enablement.
      Signed-off-by: NOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6c419ba8
    • O
      net/mlx5: E-Switch, Fix error flow in the SRIOV e-switch init code · 4eea37d7
      Or Gerlitz 提交于
      When enablement of the SRIOV e-switch in certain mode (switchdev or legacy)
      fails, we must set the mode to none. Otherwise, we'll run into double free
      based crashes when further attempting to deal with the e-switch (such
      as when disabling sriov or unloading the driver).
      Signed-off-by: NOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4eea37d7
    • R
      net/mlx5: Fix flow counter bulk command out mailbox allocation · babd6134
      Roi Dayan 提交于
      The FW command output length should be only the length of struct
      mlx5_cmd_fc_bulk out field. Failing to do so will cause the memcpy
      call which is invoked later in the driver to write over wrong memory
      address and corrupt kernel memory which results in random crashes.
      
      This bug was found using the kernel address sanitizer (kasan).
      
      Fixes: a351a1b0 ('net/mlx5: Introduce bulk reading of flow counters')
      Signed-off-by: NRoi Dayan <roid@mellanox.com>
      Signed-off-by: NOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      babd6134
    • J
      irqchip/gicv3: Silence noisy DEBUG_PER_CPU_MAPS warning · 727653d6
      James Morse 提交于
      gic_raise_softirq() walks the list of cpus using for_each_cpu(), it calls
      gic_compute_target_list() which advances the iterator by the number of
      CPUs in the cluster.
      
      If gic_compute_target_list() reaches the last CPU it leaves the iterator
      pointing at the last CPU. This means the next time round the for_each_cpu()
      loop cpumask_next() will be called with an invalid CPU.
      
      This triggers a warning when built with CONFIG_DEBUG_PER_CPU_MAPS:
      [    3.077738] GICv3: CPU1: found redistributor 1 region 0:0x000000002f120000
      [    3.077943] CPU1: Booted secondary processor [410fd0f0]
      [    3.078542] ------------[ cut here ]------------
      [    3.078746] WARNING: CPU: 1 PID: 0 at ../include/linux/cpumask.h:121 gic_raise_softirq+0x12c/0x170
      [    3.078812] Modules linked in:
      [    3.078869]
      [    3.078930] CPU: 1 PID: 0 Comm: swapper/1 Not tainted 4.8.0-rc5+ #5188
      [    3.078994] Hardware name: Foundation-v8A (DT)
      [    3.079059] task: ffff80087a1a0080 task.stack: ffff80087a19c000
      [    3.079145] PC is at gic_raise_softirq+0x12c/0x170
      [    3.079226] LR is at gic_raise_softirq+0xa4/0x170
      [    3.079296] pc : [<ffff0000083ead24>] lr : [<ffff0000083eac9c>] pstate: 200001c9
      [    3.081139] Call trace:
      [    3.081202] Exception stack(0xffff80087a19fbe0 to 0xffff80087a19fd10)
      
      [    3.082269] [<ffff0000083ead24>] gic_raise_softirq+0x12c/0x170
      [    3.082354] [<ffff00000808e614>] smp_send_reschedule+0x34/0x40
      [    3.082433] [<ffff0000080e80a0>] resched_curr+0x50/0x88
      [    3.082512] [<ffff0000080e89d0>] check_preempt_curr+0x60/0xd0
      [    3.082593] [<ffff0000080e8a60>] ttwu_do_wakeup+0x20/0xe8
      [    3.082672] [<ffff0000080e8bb8>] ttwu_do_activate+0x90/0xc0
      [    3.082753] [<ffff0000080ea9a4>] try_to_wake_up+0x224/0x370
      [    3.082836] [<ffff0000080eabc8>] default_wake_function+0x10/0x18
      [    3.082920] [<ffff000008103134>] __wake_up_common+0x5c/0xa0
      [    3.083003] [<ffff0000081031f4>] __wake_up_locked+0x14/0x20
      [    3.083086] [<ffff000008103f80>] complete+0x40/0x60
      [    3.083168] [<ffff00000808df7c>] secondary_start_kernel+0x15c/0x1d0
      [    3.083240] [<00000000808911a4>] 0x808911a4
      [    3.113401] Detected PIPT I-cache on CPU2
      
      Avoid updating the iterator if the next call to cpumask_next() would
      cause the for_each_cpu() loop to exit.
      
      There is no change to gic_raise_softirq()'s behaviour, (cpumask_next()s
      eventual call to _find_next_bit() will return early as start >= nbits),
      this patch just silences the warning.
      
      Fixes: 021f6537 ("irqchip: gic-v3: Initial support for GICv3")
      Signed-off-by: NJames Morse <james.morse@arm.com>
      Acked-by: NMarc Zyngier <marc.zyngier@arm.com>
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: Jason Cooper <jason@lakedaemon.net>
      Link: http://lkml.kernel.org/r/1474306155-3303-1-git-send-email-james.morse@arm.comSigned-off-by: NThomas Gleixner <tglx@linutronix.de>
      727653d6
    • A
      rapidio/rio_cm: avoid GFP_KERNEL in atomic context · b92ae139
      Alexandre Bounine 提交于
      As reported by Alexey Khoroshilov (https://lkml.org/lkml/2016/9/9/737):
      riocm_send_close() is called from rio_cm_shutdown() under
      spin_lock_bh(idr_lock), but riocm_send_close() uses a GFP_KERNEL
      allocation.
      
      Fix by taking riocm_send_close() outside of spinlock protected code.
      
      [akpm@linux-foundation.org: remove unneeded `if (!list_empty())']
      Link: http://lkml.kernel.org/r/20160915175402.10122-1-alexandre.bounine@idt.comSigned-off-by: NAlexandre Bounine <alexandre.bounine@idt.com>
      Reported-by: NAlexey Khoroshilov <khoroshilov@ispras.ru>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      b92ae139