1. 08 2月, 2013 3 次提交
  2. 01 2月, 2013 8 次提交
  3. 31 1月, 2013 7 次提交
    • A
      dm: fix write same requests counting · fe7af2d3
      Alasdair G Kergon 提交于
      When processing write same requests, fix dm to send the configured
      number of WRITE SAME requests to the target rather than the number of
      discards, which is not always the same.
      
      Device-mapper WRITE SAME support was introduced by commit
      23508a96 ("dm: add WRITE SAME support").
      Signed-off-by: NAlasdair G Kergon <agk@redhat.com>
      Acked-by: NMike Snitzer <snitzer@redhat.com>
      fe7af2d3
    • M
      dm thin: fix queue limits stacking · 0f640dca
      Mike Snitzer 提交于
      thin_io_hints() is blindly copying the queue limits from the thin-pool
      which can lead to incorrect limits being set.  The fix here simply
      deletes the thin_io_hints() hook which leaves the existing stacking
      infrastructure to set the limits correctly.
      
      When a thin-pool uses an MD device for the data device a thin device
      from the thin-pool must respect MD's constraints about disallowing a bio
      from spanning multiple chunks.  Otherwise we can see problems.  If the raid0
      chunksize is 1152K and thin-pool chunksize is 256K I see the following
      md/raid0 error (with extra debug tracing added to thin_endio) when
      mkfs.xfs is executed against the thin device:
      
      md/raid0:md99: make_request bug: can't convert block across chunks or bigger than 1152k 6688 127
      device-mapper: thin: bio sector=2080 err=-5 bi_size=130560 bi_rw=17 bi_vcnt=32 bi_idx=0
      
      This extra DM debugging shows that the failing bio is spanning across
      the first and second logical 1152K chunk (sector 2080 + 255 takes the
      bio beyond the first chunk's boundary of sector 2304).  So the bio
      splitting that DM is doing clearly isn't respecting the MD limits.
      
      max_hw_sectors_kb is 127 for both the thin-pool and thin device
      (queue_max_hw_sectors returns 255 so we'll excuse sysfs's lack of
      precision).  So this explains why bi_size is 130560.
      
      But the thin device's max_hw_sectors_kb should be 4 (PAGE_SIZE) given
      that it doesn't have a .merge function (for bio_add_page to consult
      indirectly via dm_merge_bvec) yet the thin-pool does sit above an MD
      device that has a compulsory merge_bvec_fn.  This scenario is exactly
      why DM must resort to sending single PAGE_SIZE bios to the underlying
      layer. Some additional context for this is available in the header for
      commit 8cbeb67a ("dm: avoid unsupported spanning of md stripe boundaries").
      
      Long story short, the reason a thin device doesn't properly get
      configured to have a max_hw_sectors_kb of 4 (PAGE_SIZE) is that
      thin_io_hints() is blindly copying the queue limits from the thin-pool
      device directly to the thin device's queue limits.
      
      Fix this by eliminating thin_io_hints.  Doing so is safe because the
      block layer's queue limits stacking already enables the upper level thin
      device to inherit the thin-pool device's discard and minimum_io_size and
      optimal_io_size limits that get set in pool_io_hints.  But avoiding the
      queue limits copy allows the thin and thin-pool limits to be different
      where it is important, namely max_hw_sectors_kb.
      Reported-by: NDaniel Browning <db@kavod.com>
      Signed-off-by: NMike Snitzer <snitzer@redhat.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: NAlasdair G Kergon <agk@redhat.com>
      0f640dca
    • A
      drm/radeon/evergreen+: wait for the MC to settle after MC blackout · ed39fadd
      Alex Deucher 提交于
      Some chips seem to need a little delay after blacking out
      the MC before the requests actually stop.
      
      May fix:
      https://bugs.freedesktop.org/show_bug.cgi?id=56139
      https://bugs.freedesktop.org/show_bug.cgi?id=57567Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      Cc: stable@vger.kernel.org
      ed39fadd
    • M
      samsung-laptop: Disable on EFI hardware · e0094244
      Matt Fleming 提交于
      It has been reported that running this driver on some Samsung laptops
      with EFI can cause those machines to become bricked as detailed in the
      following report,
      
      	https://bugs.launchpad.net/ubuntu-cdimage/+bug/1040557
      
      There have also been reports of this driver causing Machine Check
      Exceptions on recent EFI-enabled Samsung laptops,
      
      	https://bugzilla.kernel.org/show_bug.cgi?id=47121
      
      So disable it if booting from EFI since this driver relies on
      grovelling around in the BIOS memory map which isn't going to work.
      
      Cc: Corentin Chary <corentincj@iksaif.net>
      Cc: Matthew Garrett <mjg59@srcf.ucam.org>
      Cc: Colin Ian King <colin.king@canonical.com>
      Cc: Steve Langasek <steve.langasek@canonical.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NMatt Fleming <matt.fleming@intel.com>
      Signed-off-by: NH. Peter Anvin <hpa@linux.intel.com>
      e0094244
    • M
      efi: Make 'efi_enabled' a function to query EFI facilities · 83e68189
      Matt Fleming 提交于
      Originally 'efi_enabled' indicated whether a kernel was booted from
      EFI firmware. Over time its semantics have changed, and it now
      indicates whether or not we are booted on an EFI machine with
      bit-native firmware, e.g. 64-bit kernel with 64-bit firmware.
      
      The immediate motivation for this patch is the bug report at,
      
          https://bugs.launchpad.net/ubuntu-cdimage/+bug/1040557
      
      which details how running a platform driver on an EFI machine that is
      designed to run under BIOS can cause the machine to become
      bricked. Also, the following report,
      
          https://bugzilla.kernel.org/show_bug.cgi?id=47121
      
      details how running said driver can also cause Machine Check
      Exceptions. Drivers need a new means of detecting whether they're
      running on an EFI machine, as sadly the expression,
      
          if (!efi_enabled)
      
      hasn't been a sufficient condition for quite some time.
      
      Users actually want to query 'efi_enabled' for different reasons -
      what they really want access to is the list of available EFI
      facilities.
      
      For instance, the x86 reboot code needs to know whether it can invoke
      the ResetSystem() function provided by the EFI runtime services, while
      the ACPI OSL code wants to know whether the EFI config tables were
      mapped successfully. There are also checks in some of the platform
      driver code to simply see if they're running on an EFI machine (which
      would make it a bad idea to do BIOS-y things).
      
      This patch is a prereq for the samsung-laptop fix patch.
      
      Cc: David Airlie <airlied@linux.ie>
      Cc: Corentin Chary <corentincj@iksaif.net>
      Cc: Matthew Garrett <mjg59@srcf.ucam.org>
      Cc: Dave Jiang <dave.jiang@intel.com>
      Cc: Olof Johansson <olof@lixom.net>
      Cc: Peter Jones <pjones@redhat.com>
      Cc: Colin Ian King <colin.king@canonical.com>
      Cc: Steve Langasek <steve.langasek@canonical.com>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Konrad Rzeszutek Wilk <konrad@kernel.org>
      Cc: Rafael J. Wysocki <rjw@sisk.pl>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NMatt Fleming <matt.fleming@intel.com>
      Signed-off-by: NH. Peter Anvin <hpa@linux.intel.com>
      83e68189
    • M
      drm/radeon: protect against div by 0 in backend setup · f689e3ac
      Mikko Tiihonen 提交于
      Make sure at least one RB is enabled in
      r6xx_remap_render_backend() to avoid an division by
      zero in some corner cases.
      
      See:
      https://bugzilla.redhat.com/show_bug.cgi?id=892233Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      Cc: stable@vger.kernel.org
      f689e3ac
    • A
      drm/radeon: fix backend map setup on 1 RB sumo boards · f7eb9730
      Alex Deucher 提交于
      Need to adjust the backend map depending on which
      RB is enabled.
      
      Fixes:
      https://bugzilla.redhat.com/show_bug.cgi?id=892233Reported-by: NMikko Tiihonen <mikko.tiihonen@iki.fi>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      Cc: stable@vger.kernel.org
      f7eb9730
  4. 30 1月, 2013 8 次提交
    • J
      EDAC: Fix kcalloc argument order · d3d09e18
      Joe Perches 提交于
      First number, then size.
      Signed-off-by: NJoe Perches <joe@perches.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NBorislav Petkov <bp@suse.de>
      d3d09e18
    • D
      EDAC: Test correct variable in ->store function · 8024c4c0
      Dan Carpenter 提交于
      We're testing for ->show but calling ->store().
      Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: NBorislav Petkov <bp@suse.de>
      8024c4c0
    • N
      target: Fix zero-length READ_CAPACITY_16 regression · 8b4b0dcb
      Nicholas Bellinger 提交于
      This patch fixes a regression introduced in v3.8-rc1 code where a
      zero-length READ_CAPACITY_16 was no longer returning GOOD status, but
      instead returning TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE to generate
      a CHECK_CONDITION status.
      
      This regression was introduced with the following commit:
      
        commit de103c93
        Author: Christoph Hellwig <hch@lst.de>
        Date:   Tue Nov 6 12:24:09 2012 -0800
      
            target: pass sense_reason as a return value
      
      and this patch has been tested with the following zero-length CDB:
      
        sg_raw /dev/sdd 9e 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00
        SCSI Status: Good
      
        Sense Information:
        sense buffer empty
      
      Also, convert sbc_emulate_readcapacity() to follow the same method
      of handling transport_kmap_data_sg() return values, but we never
      expect a zero-length request here.
      
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Roland Dreier <roland@purestorage.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      8b4b0dcb
    • N
      target: Fix zero-length MODE_SENSE regression · cab9609b
      Nicholas Bellinger 提交于
      This patch fixes a regression introduced in v3.8-rc1 code where
      a zero-length MODE_SENSE was no longer returning GOOD status, but
      instead returning TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE to generate
      a CHECK_CONDITION status.
      
      This regression was introduced with the following commit:
      
        commit de103c93
        Author: Christoph Hellwig <hch@lst.de>
        Date:   Tue Nov 6 12:24:09 2012 -0800
      
            target: pass sense_reason as a return value
      
      and this patch has been tested with the following zero-length CDB:
      
        sg_raw /dev/sdd 5a 00 0a 00 00 00 00 00 00 00
        SCSI Status: Good
      
        Sense Information:
        sense buffer empty
      
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Roland Dreier <roland@purestorage.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      cab9609b
    • N
      target: Fix zero-length INQUIRY additional sense code regression · 49df9fc9
      Nicholas Bellinger 提交于
      This patch fixes a minor regression introduced in v3.8-rc1 code
      where a zero-length INQUIRY was no longer returning the correct
      INVALID FIELD IN CDB additional sense code.
      
      This regression was introduced with the following commit:
      
        commit de103c93
        Author: Christoph Hellwig <hch@lst.de>
        Date:   Tue Nov 6 12:24:09 2012 -0800
      
            target: pass sense_reason as a return value
      
      and this patch has been tested with the following zero-length CDB:
      
        sg_raw /dev/sdd 12 00 83 00 00 00
        SCSI Status: Check Condition
      
        Sense Information:
         Fixed format, current;  Sense key: Illegal Request
         Additional sense: Invalid field in cdb
      
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Roland Dreier <roland@purestorage.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      49df9fc9
    • A
      pinctrl: nomadik: nmk_prcm_gpiocr_get_mode may be unused · 0fafd50e
      Arnd Bergmann 提交于
      nmk_prcm_gpiocr_get_mode is only needed for debugfs output at
      the moment, which can be compile-time disabled. Marking
      the function __maybe_unused still gives us compile-time
      coverage, but avoids a gcc warning.
      
      Without this patch, building nhk8815_defconfig results in:
      
      drivers/pinctrl/pinctrl-nomadik.c:676:12: warning: 'nmk_prcm_gpiocr_get_mode' defined but not used [-Wunused-function]
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Cc: Jean-Nicolas Graux <jean-nicolas.graux@stericsson.com>
      Cc: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      0fafd50e
    • A
      pinctrl: exynos: don't mark probing functions as __init · 312b00e5
      Arnd Bergmann 提交于
      Functions called from a driver probe() method must not be
      marked __init, because they may get called after the
      init phase is done, when the device shows up late, or
      because of deferred probing.
      
      Without this patch, building exynos_defconfig results in
      multiple warnings like:
      
      WARNING: drivers/pinctrl/built-in.o(.text+0x51bc): Section mismatch in reference from the function exynos5440_pinctrl_probe() to the function .init.text:exynos5440_gpiolib_register()
      The function exynos5440_pinctrl_probe() references
      the function __init exynos5440_gpiolib_register().
      This is often because exynos5440_pinctrl_probe lacks a __init
      annotation or the annotation of exynos5440_gpiolib_register is wrong.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Cc: Tomasz Figa <t.figa@samsung.com>
      Acked-by: NKukjin Kim <kgene.kim@samsung.com>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      312b00e5
    • A
      drm/radeon: add quirk for RV100 board · 9200ee49
      Alex Deucher 提交于
      vbios says external TMDS while the board is actually
      internal TMDS.
      
      fixes:
      https://bugs.freedesktop.org/show_bug.cgi?id=60037Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      Cc: stable@vger.kernel.org
      9200ee49
  5. 28 1月, 2013 8 次提交
  6. 27 1月, 2013 6 次提交
    • E
      net: loopback: fix a dst refcounting issue · 794ed393
      Eric Dumazet 提交于
      Ben Greear reported crashes in ip_rcv_finish() on a stress
      test involving many macvlans.
      
      We tracked the bug to a dst use after free. ip_rcv_finish()
      was calling dst->input() and got garbage for dst->input value.
      
      It appears the bug is in loopback driver, lacking
      a skb_dst_force() before calling netif_rx().
      
      As a result, a non refcounted dst, normally protected by a
      RCU read_lock section, was escaping this section and could
      be freed before the packet being processed.
      
        [<ffffffff813a3c4d>] loopback_xmit+0x64/0x83
        [<ffffffff81477364>] dev_hard_start_xmit+0x26c/0x35e
        [<ffffffff8147771a>] dev_queue_xmit+0x2c4/0x37c
        [<ffffffff81477456>] ? dev_hard_start_xmit+0x35e/0x35e
        [<ffffffff8148cfa6>] ? eth_header+0x28/0xb6
        [<ffffffff81480f09>] neigh_resolve_output+0x176/0x1a7
        [<ffffffff814ad835>] ip_finish_output2+0x297/0x30d
        [<ffffffff814ad6d5>] ? ip_finish_output2+0x137/0x30d
        [<ffffffff814ad90e>] ip_finish_output+0x63/0x68
        [<ffffffff814ae412>] ip_output+0x61/0x67
        [<ffffffff814ab904>] dst_output+0x17/0x1b
        [<ffffffff814adb6d>] ip_local_out+0x1e/0x23
        [<ffffffff814ae1c4>] ip_queue_xmit+0x315/0x353
        [<ffffffff814adeaf>] ? ip_send_unicast_reply+0x2cc/0x2cc
        [<ffffffff814c018f>] tcp_transmit_skb+0x7ca/0x80b
        [<ffffffff814c3571>] tcp_connect+0x53c/0x587
        [<ffffffff810c2f0c>] ? getnstimeofday+0x44/0x7d
        [<ffffffff810c2f56>] ? ktime_get_real+0x11/0x3e
        [<ffffffff814c6f9b>] tcp_v4_connect+0x3c2/0x431
        [<ffffffff814d6913>] __inet_stream_connect+0x84/0x287
        [<ffffffff814d6b38>] ? inet_stream_connect+0x22/0x49
        [<ffffffff8108d695>] ? _local_bh_enable_ip+0x84/0x9f
        [<ffffffff8108d6c8>] ? local_bh_enable+0xd/0x11
        [<ffffffff8146763c>] ? lock_sock_nested+0x6e/0x79
        [<ffffffff814d6b38>] ? inet_stream_connect+0x22/0x49
        [<ffffffff814d6b49>] inet_stream_connect+0x33/0x49
        [<ffffffff814632c6>] sys_connect+0x75/0x98
      
      This bug was introduced in linux-2.6.35, in commit
      7fee226a (net: add a noref bit on skb dst)
      
      skb_dst_force() is enforced in dev_queue_xmit() for devices having a
      qdisc.
      Reported-by: NBen Greear <greearb@candelatech.com>
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Tested-by: NBen Greear <greearb@candelatech.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      794ed393
    • W
      virtio-net: reset virtqueue affinity when doing cpu hotplug · 8de4b2f3
      Wanlong Gao 提交于
      Add a cpu notifier to virtio-net, so that we can reset the
      virtqueue affinity if the cpu hotplug happens. It improve
      the performance through enabling or disabling the virtqueue
      affinity after doing cpu hotplug.
      
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: "Michael S. Tsirkin" <mst@redhat.com>
      Cc: Jason Wang <jasowang@redhat.com>
      Cc: Eric Dumazet <erdnetdev@gmail.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: virtualization@lists.linux-foundation.org
      Cc: netdev@vger.kernel.org
      Signed-off-by: NWanlong Gao <gaowanlong@cn.fujitsu.com>
      Acked-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8de4b2f3
    • W
      virtio-net: split out clean affinity function · 8898c21c
      Wanlong Gao 提交于
      Split out the clean affinity function to virtnet_clean_affinity().
      
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: "Michael S. Tsirkin" <mst@redhat.com>
      Cc: Jason Wang <jasowang@redhat.com>
      Cc: Eric Dumazet <erdnetdev@gmail.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: virtualization@lists.linux-foundation.org
      Cc: netdev@vger.kernel.org
      Signed-off-by: NWanlong Gao <gaowanlong@cn.fujitsu.com>
      Acked-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8898c21c
    • W
      virtio-net: fix the set affinity bug when CPU IDs are not consecutive · 47be2479
      Wanlong Gao 提交于
      As Michael mentioned, set affinity and select queue will not work very
      well when CPU IDs are not consecutive, this can happen with hot unplug.
      Fix this bug by traversal the online CPUs, and create a per cpu variable
      to find the mapping from CPU to the preferable virtual-queue.
      
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: "Michael S. Tsirkin" <mst@redhat.com>
      Cc: Jason Wang <jasowang@redhat.com>
      Cc: Eric Dumazet <erdnetdev@gmail.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: virtualization@lists.linux-foundation.org
      Cc: netdev@vger.kernel.org
      Signed-off-by: NWanlong Gao <gaowanlong@cn.fujitsu.com>
      Acked-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      47be2479
    • W
      mfd: rtsx: Fix oops when rtsx_pci_sdmmc is not probed · 2d1484f5
      Wei WANG 提交于
      If rtsx_pci_sdmmc is not probed, function pointer pcr->slots[].card_event
      will point to NULL, and thus rtsx_pci_card_detect will reference a NULL
      pointer.
      Check card_event pointer before referencing it can avoid kernel panic.
      Signed-off-by: NWei WANG <wei_wang@realsil.com.cn>
      Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
      2d1484f5
    • M
      mfd: wm5102: Fix definition of WM5102_MAX_REGISTER · ff0decd4
      Mark Brown 提交于
      Updated in latest datasheet.
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
      ff0decd4