1. 09 11月, 2015 1 次提交
  2. 31 10月, 2015 5 次提交
    • M
      drm: Correct arguments to list_tail_add in create blob ioctl · 8731b269
      Maneet Singh 提交于
      Arguments passed to list_add_tail were reversed resulting in deletion
      of old blob property everytime the new one is added.
      
      Fixes
      
      commit e2f5d2ea
      Author: Daniel Stone <daniels@collabora.com>
      Date:   Fri May 22 13:34:51 2015 +0100
      
          drm/mode: Add user blob-creation ioctl
      Signed-off-by: NManeet Singh <mmaneetsingh@nvidia.com>
      [seanpaul tweaked commit subject a little]
      Signed-off-by: NSean Paul <seanpaul@chromium.org>
      Cc: stable@kernel.org # v4.2
      Reviewed-by: NDaniel Stone <daniels@collabora.com>
      Reviewed-by: NJani Nikula <jani.nikula@intel.com>
      Signed-off-by: NDave Airlie <airlied@gmail.com>
      8731b269
    • N
      Revert "md: allow a partially recovered device to be hot-added to an array." · d01552a7
      NeilBrown 提交于
      This reverts commit 7eb41885.
      
      This commit is poorly justified, I can find not discusison in email,
      and it clearly causes a problem.
      
      If a device which is being recovered fails and is subsequently
      re-added to an array, there could easily have been changes to the
      array *before* the point where the recovery was up to.  So the
      recovery must start again from the beginning.
      
      If a spare is being recovered and fails, then when it is re-added we
      really should do a bitmap-based recovery up to the recovery-offset,
      and then a full recovery from there.  Before this reversion, we only
      did the "full recovery from there" which is not corect.  After this
      reversion with will do a full recovery from the start, which is safer
      but not ideal.
      
      It will be left to a future patch to arrange the two different styles
      of recovery.
      Reported-and-tested-by: NNate Dailey <nate.dailey@stratus.com>
      Signed-off-by: NNeilBrown <neilb@suse.com>
      Cc: stable@vger.kernel.org (3.14+)
      Fixes: 7eb41885 ("md: allow a partially recovered device to be hot-added to an array.")
      d01552a7
    • D
      drm: crtc: integer overflow in drm_property_create_blob() · 9ac0934b
      Dan Carpenter 提交于
      The size here comes from the user via the ioctl, it is a number between
      1-u32max so the addition here could overflow on 32 bit systems.
      
      Fixes: f453ba04 ('DRM: add mode setting support')
      Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
      Reviewed-by: NDaniel Stone <daniels@collabora.com>
      Cc: stable@kernel.org # v4.2
      Signed-off-by: NDave Airlie <airlied@gmail.com>
      9ac0934b
    • R
      md/raid5: fix locking in handle_stripe_clean_event() · b8a9d66d
      Roman Gushchin 提交于
      After commit 566c09c5 ("raid5: relieve lock contention in get_active_stripe()")
      __find_stripe() is called under conf->hash_locks + hash.
      But handle_stripe_clean_event() calls remove_hash() under
      conf->device_lock.
      
      Under some cirscumstances the hash chain can be circuited,
      and we get an infinite loop with disabled interrupts and locked hash
      lock in __find_stripe(). This leads to hard lockup on multiple CPUs
      and following system crash.
      
      I was able to reproduce this behavior on raid6 over 6 ssd disks.
      The devices_handle_discard_safely option should be set to enable trim
      support. The following script was used:
      
      for i in `seq 1 32`; do
          dd if=/dev/zero of=large$i bs=10M count=100 &
      done
      
      neilb: original was against a 3.x kernel.  I forward-ported
        to 4.3-rc.  This verison is suitable for any kernel since
        Commit: 59fc630b ("RAID5: batch adjacent full stripe write")
        (v4.1+).  I'll post a version for earlier kernels to stable.
      Signed-off-by: NRoman Gushchin <klamm@yandex-team.ru>
      Fixes: 566c09c5 ("raid5: relieve lock contention in get_active_stripe()")
      Signed-off-by: NNeilBrown <neilb@suse.com>
      Cc: Shaohua Li <shli@kernel.org>
      Cc: <stable@vger.kernel.org> # 3.13 - 4.2
      b8a9d66d
    • R
      rbd: require stable pages if message data CRCs are enabled · bae818ee
      Ronny Hegewald 提交于
      rbd requires stable pages, as it performs a crc of the page data before
      they are send to the OSDs.
      
      But since kernel 3.9 (patch 1d1d1a76
      "mm: only enforce stable page writes if the backing device requires
      it") it is not assumed anymore that block devices require stable pages.
      
      This patch sets the necessary flag to get stable pages back for rbd.
      
      In a ceph installation that provides multiple ext4 formatted rbd
      devices "bad crc" messages appeared regularly (ca 1 message every 1-2
      minutes on every OSD that provided the data for the rbd) in the
      OSD-logs before this patch. After this patch this messages are pretty
      much gone (only ca 1-2 / month / OSD).
      
      Cc: stable@vger.kernel.org # 3.9+, needs backporting
      Signed-off-by: NRonny Hegewald <Ronny.Hegewald@online.de>
      [idryomov@gmail.com: require stable pages only in crc case, changelog]
      Signed-off-by: NIlya Dryomov <idryomov@gmail.com>
      bae818ee
  3. 29 10月, 2015 3 次提交
  4. 28 10月, 2015 6 次提交
    • M
      clocksource/drivers/sh_mtu2: Fix multiple shutdown call issue · fe326c5c
      Magnus Damm 提交于
      On the r7s72100 Genmai board the MTU2 driver currently triggers a common
      clock framework WARN_ON(enable_count) when disabling the clock due to
      the MTU2 driver after recent callback rework may call ->set_state_shutdown()
      multiple times. A similar issue was spotted for the TMU driver and fixed in:
      452b1324 clocksource/drivers/sh_tmu: Fix traceback spotted in -next
      
      On r7s72100 Genmai v4.3-rc7 built with shmobile_defconfig spits out the
      following during boot:
      
      sh_mtu2 fcff0000.timer: ch0: used for clock events
      ------------[ cut here ]------------
      WARNING: CPU: 0 PID: 1 at drivers/clk/clk.c:675 clk_core_disable+0x2c/0x6c()
      CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.3.0-rc7 #1
      Hardware name: Generic R7S72100 (Flattened Device Tree)
      Backtrace:
      [<c00133d4>] (dump_backtrace) from [<c0013570>] (show_stack+0x18/0x1c)
      [<c0013558>] (show_stack) from [<c01c7aac>] (dump_stack+0x74/0x90)
      [<c01c7a38>] (dump_stack) from [<c00272fc>] (warn_slowpath_common+0x88/0xb4)
      [<c0027274>] (warn_slowpath_common) from [<c0027400>] (warn_slowpath_null+0x24/0x2c)
      [<c00273dc>] (warn_slowpath_null) from [<c03a9320>] (clk_core_disable+0x2c/0x6c)
      [<c03a92f4>] (clk_core_disable) from [<c03aa0a0>] (clk_disable+0x40/0x4c)
      [<c03aa060>] (clk_disable) from [<c0395d2c>] (sh_mtu2_disable+0x24/0x50)
      [<c0395d08>] (sh_mtu2_disable) from [<c0395d6c>] (sh_mtu2_clock_event_shutdown+0x14/0x1c)
      [<c0395d58>] (sh_mtu2_clock_event_shutdown) from [<c007d7d0>] (clockevents_switch_state+0xc8/0x114)
      [<c007d708>] (clockevents_switch_state) from [<c007d834>] (clockevents_shutdown+0x18/0x28)
      [<c007d81c>] (clockevents_shutdown) from [<c007dd58>] (clockevents_exchange_device+0x70/0x78)
      [<c007dce8>] (clockevents_exchange_device) from [<c007e578>] (tick_check_new_device+0x88/0xe0)
      [<c007e4f0>] (tick_check_new_device) from [<c007daf0>] (clockevents_register_device+0xac/0x120)
      [<c007da44>] (clockevents_register_device) from [<c0395be8>] (sh_mtu2_probe+0x230/0x350)
      [<c03959b8>] (sh_mtu2_probe) from [<c028b6f0>] (platform_drv_probe+0x50/0x98)
      Reported-by: NChris Brandt <chris.brandt@renesas.com>
      Fixes: 19a9ffb3 ("clockevents/drivers/sh_mtu2: Migrate to new 'set-state' interface")
      Cc: Viresh Kumar <viresh.kumar@linaro.org>
      Cc: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
      Signed-off-by: NMagnus Damm <damm+renesas@opensource.se>
      Signed-off-by: NDaniel Lezcano <daniel.lezcano@linaro.org>
      Reviewed-by: NViresh Kumar <viresh.kumar@linaro.org>
      fe326c5c
    • C
      net/mlx4: Copy/set only sizeof struct mlx4_eqe bytes · c02b0501
      Carol L Soto 提交于
      When doing memcpy/memset of EQEs, we should use sizeof struct
      mlx4_eqe as the base size and not caps.eqe_size which could be bigger.
      
      If caps.eqe_size is bigger than the struct mlx4_eqe then we corrupt
      data in the master context.
      
      When using a 64 byte stride, the memcpy copied over 63 bytes to the
      slave_eq structure.  This resulted in copying over the entire eqe of
      interest, including its ownership bit -- and also 31 bytes of garbage
      into the next WQE in the slave EQ -- which did NOT include the ownership
      bit (and therefore had no impact).
      
      However, once the stride is increased to 128, we are overwriting the
      ownership bits of *three* eqes in the slave_eq struct.  This results
      in an incorrect ownership bit for those eqes, which causes the eq to
      seem to be full. The issue therefore surfaced only once 128-byte EQEs
      started being used in SRIOV and (overarchitectures that have 128/256
      byte cache-lines such as PPC) - e.g after commit 77507aa2
      "net/mlx4_core: Enable CQE/EQE stride support".
      
      Fixes: 08ff3235 ('mlx4: 64-byte CQE/EQE support')
      Signed-off-by: NCarol L Soto <clsoto@linux.vnet.ibm.com>
      Signed-off-by: NJack Morgenstein <jackm@dev.mellanox.co.il>
      Signed-off-by: NOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c02b0501
    • J
      net/mlx4_en: Explicitly set no vlan tags in WQE ctrl segment when no vlan is present · 092bf0fc
      Jack Morgenstein 提交于
      We do not set the ins_vlan field to zero when no vlan id is present in the packet.
      
      Since WQEs in the TX ring are not zeroed out between uses, this oversight
      could result in having vlan flags present in the WQE ctrl segment when no
      vlan is preset.
      
      Fixes: e38af4fa ('net/mlx4_en: Add support for hardware accelerated 802.1ad vlan')
      Reported-by: NGideon Naim <gideonn@mellanox.com>
      Signed-off-by: NJack Morgenstein <jackm@dev.mellanox.co.il>
      Signed-off-by: NOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      092bf0fc
    • M
      vhost: fix performance on LE hosts · e407f39a
      Michael S. Tsirkin 提交于
      commit 2751c988 ("vhost: cross-endian
      support for legacy devices") introduced a minor regression: even with
      cross-endian disabled, and even on LE host, vhost_is_little_endian is
      checking is_le flag so there's always a branch.
      
      To fix, simply check virtio_legacy_is_little_endian first.
      
      Cc: Greg Kurz <gkurz@linux.vnet.ibm.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      Reviewed-by: NGreg Kurz <gkurz@linux.vnet.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e407f39a
    • L
      amd-xgbe: Fix race between access of desc and desc index · 20986ed8
      Lendacky, Thomas 提交于
      During Tx cleanup it's still possible for the descriptor data to be
      read ahead of the descriptor index. A memory barrier is required between
      the read of the descriptor index and the start of the Tx cleanup loop.
      This allows a change to a lighter-weight barrier in the Tx transmit
      routine just before updating the current descriptor index.
      
      Since the memory barrier does result in extra overhead on arm64, keep
      the previous change to not chase the current descriptor value. This
      prevents the execution of the barrier for each loop performed.
      Suggested-by: NAlexander Duyck <alexander.duyck@gmail.com>
      Signed-off-by: NTom Lendacky <thomas.lendacky@amd.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      20986ed8
    • N
      forcedeth: fix unilateral interrupt disabling in netpoll path · 0b7c8743
      Neil Horman 提交于
      Forcedeth currently uses disable_irq_lockdep and enable_irq_lockdep, which in
      some configurations simply calls local_irq_disable.  This causes errant warnings
      in the netpoll path as in netpoll_send_skb_on_dev, where we disable irqs using
      local_irq_save, leading to the following warning:
      
      WARNING: at net/core/netpoll.c:352 netpoll_send_skb_on_dev+0x243/0x250() (Not
      tainted)
      Hardware name:
      netpoll_send_skb_on_dev(): eth0 enabled interrupts in poll
      (nv_start_xmit_optimized+0x0/0x860 [forcedeth])
      Modules linked in: netconsole(+) configfs ipv6 iptable_filter ip_tables ppdev
      parport_pc parport sg microcode serio_raw edac_core edac_mce_amd k8temp
      snd_hda_codec_realtek snd_hda_codec_generic forcedeth snd_hda_intel
      snd_hda_codec snd_hwdep snd_seq snd_seq_device snd_pcm snd_timer snd soundcore
      snd_page_alloc i2c_nforce2 i2c_core shpchp ext4 jbd2 mbcache sr_mod cdrom sd_mod
      crc_t10dif pata_amd ata_generic pata_acpi sata_nv dm_mirror dm_region_hash
      dm_log dm_mod [last unloaded: scsi_wait_scan]
      Pid: 1940, comm: modprobe Not tainted 2.6.32-573.7.1.el6.x86_64.debug #1
      Call Trace:
       [<ffffffff8107bbc1>] ? warn_slowpath_common+0x91/0xe0
       [<ffffffff8107bcc6>] ? warn_slowpath_fmt+0x46/0x60
       [<ffffffffa00fe5b0>] ? nv_start_xmit_optimized+0x0/0x860 [forcedeth]
       [<ffffffff814b3593>] ? netpoll_send_skb_on_dev+0x243/0x250
       [<ffffffff814b37c9>] ? netpoll_send_udp+0x229/0x270
       [<ffffffffa02e3299>] ? write_msg+0x39/0x110 [netconsole]
       [<ffffffffa02e331b>] ? write_msg+0xbb/0x110 [netconsole]
       [<ffffffff8107bd55>] ? __call_console_drivers+0x75/0x90
       [<ffffffff8107bdba>] ? _call_console_drivers+0x4a/0x80
       [<ffffffff8107c445>] ? release_console_sem+0xe5/0x250
       [<ffffffff8107d200>] ? register_console+0x190/0x3e0
       [<ffffffffa02e71a6>] ? init_netconsole+0x1a6/0x216 [netconsole]
       [<ffffffffa02e7000>] ? init_netconsole+0x0/0x216 [netconsole]
       [<ffffffff810020d0>] ? do_one_initcall+0xc0/0x280
       [<ffffffff810d4933>] ? sys_init_module+0xe3/0x260
       [<ffffffff8100b0d2>] ? system_call_fastpath+0x16/0x1b
      ---[ end trace f349c7af88e6a6d5 ]---
      console [netcon0] enabled
      netconsole: network logging started
      
      Fix it by modifying the forcedeth code to use
      disable_irq_nosync_lockdep_irqsavedisable_irq_nosync_lockdep_irqsave instead,
      which saves and restores irq state properly.  This also saves us a little code
      in the process
      
      Tested by the reporter, with successful restuls
      
      Patch applies to the head of the net tree
      Signed-off-by: NNeil Horman <nhorman@tuxdriver.com>
      CC: "David S. Miller" <davem@davemloft.net>
      Reported-by: NVasily Averin <vvs@sw.ru>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0b7c8743
  5. 27 10月, 2015 19 次提交
  6. 26 10月, 2015 6 次提交