1. 13 4月, 2013 2 次提交
  2. 12 4月, 2013 5 次提交
  3. 11 4月, 2013 2 次提交
    • Y
      bnx2x: Prevent null pointer dereference in AFEX mode · fea75645
      Yuval Mintz 提交于
      The cnic module is responsible for initializing various bnx2x structs
      via callbacks provided by the bnx2x module.
      One such struct is the queue object for the FCoE queue.
      
      If a device is working in AFEX mode and its configuration allows FCoE yet
      the cnic module is not loaded, it's very likely a null pointer dereference
      will occur, as the bnx2x will erroneously access the FCoE's queue object.
      
      Prevent said access until cnic properly registers itself.
      Signed-off-by: NYuval Mintz <yuvalmin@broadcom.com>
      Signed-off-by: NAriel Elior <ariele@broadcom.com>
      Signed-off-by: NEilon Greenstein <eilong@broadcom.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fea75645
    • N
      e100: Add dma mapping error check · 61a0f6ef
      Neil Horman 提交于
      e100 uses pci_map_single, but fails to check for a dma mapping error after its
      use, resulting in a stack trace:
      
      [   46.656594] ------------[ cut here ]------------
      [   46.657004] WARNING: at lib/dma-debug.c:933 check_unmap+0x47b/0x950()
      [   46.657004] Hardware name: To Be Filled By O.E.M.
      [   46.657004] e100 0000:00:0e.0: DMA-API: device driver failed to check map
      error[device address=0x000000007a4540fa] [size=90 bytes] [mapped as single]
      [   46.657004] Modules linked in:
      [   46.657004]  w83627hf hwmon_vid snd_via82xx ppdev snd_ac97_codec ac97_bus
      snd_seq snd_pcm snd_mpu401 snd_mpu401_uart ns558 snd_rawmidi gameport parport_pc
      e100 snd_seq_device parport snd_page_alloc snd_timer snd soundcore skge shpchp
      k8temp mii edac_core i2c_viapro edac_mce_amd nfsd auth_rpcgss nfs_acl lockd
      sunrpc binfmt_misc uinput ata_generic pata_acpi radeon i2c_algo_bit
      drm_kms_helper ttm firewire_ohci drm firewire_core pata_via sata_via i2c_core
      sata_promise crc_itu_t
      [   46.657004] Pid: 792, comm: ip Not tainted 3.8.0-0.rc6.git0.1.fc19.x86_64 #1
      [   46.657004] Call Trace:
      [   46.657004]  <IRQ>  [<ffffffff81065ed0>] warn_slowpath_common+0x70/0xa0
      [   46.657004]  [<ffffffff81065f4c>] warn_slowpath_fmt+0x4c/0x50
      [   46.657004]  [<ffffffff81364cfb>] check_unmap+0x47b/0x950
      [   46.657004]  [<ffffffff8136522f>] debug_dma_unmap_page+0x5f/0x70
      [   46.657004]  [<ffffffffa030f0f0>] ? e100_tx_clean+0x30/0x210 [e100]
      [   46.657004]  [<ffffffffa030f1a8>] e100_tx_clean+0xe8/0x210 [e100]
      [   46.657004]  [<ffffffffa030fc6f>] e100_poll+0x56f/0x6c0 [e100]
      [   46.657004]  [<ffffffff8159dce1>] ? net_rx_action+0xa1/0x370
      [   46.657004]  [<ffffffff8159ddb2>] net_rx_action+0x172/0x370
      [   46.657004]  [<ffffffff810703bf>] __do_softirq+0xef/0x3d0
      [   46.657004]  [<ffffffff816e4ebc>] call_softirq+0x1c/0x30
      [   46.657004]  [<ffffffff8101c485>] do_softirq+0x85/0xc0
      [   46.657004]  [<ffffffff81070885>] irq_exit+0xd5/0xe0
      [   46.657004]  [<ffffffff816e5756>] do_IRQ+0x56/0xc0
      [   46.657004]  [<ffffffff816dacb2>] common_interrupt+0x72/0x72
      [   46.657004]  <EOI>  [<ffffffff816da1eb>] ?
      _raw_spin_unlock_irqrestore+0x3b/0x70
      [   46.657004]  [<ffffffff816d124d>] __slab_free+0x58/0x38b
      [   46.657004]  [<ffffffff81214424>] ? fsnotify_clear_marks_by_inode+0x34/0x120
      [   46.657004]  [<ffffffff811b0417>] ? kmem_cache_free+0x97/0x320
      [   46.657004]  [<ffffffff8157fc14>] ? sock_destroy_inode+0x34/0x40
      [   46.657004]  [<ffffffff8157fc14>] ? sock_destroy_inode+0x34/0x40
      [   46.657004]  [<ffffffff811b0692>] kmem_cache_free+0x312/0x320
      [   46.657004]  [<ffffffff8157fc14>] sock_destroy_inode+0x34/0x40
      [   46.657004]  [<ffffffff811e8c28>] destroy_inode+0x38/0x60
      [   46.657004]  [<ffffffff811e8d5e>] evict+0x10e/0x1a0
      [   46.657004]  [<ffffffff811e9605>] iput+0xf5/0x180
      [   46.657004]  [<ffffffff811e4338>] dput+0x248/0x310
      [   46.657004]  [<ffffffff811ce0e1>] __fput+0x171/0x240
      [   46.657004]  [<ffffffff811ce26e>] ____fput+0xe/0x10
      [   46.657004]  [<ffffffff8108d54c>] task_work_run+0xac/0xe0
      [   46.657004]  [<ffffffff8106c6ed>] do_exit+0x26d/0xc30
      [   46.657004]  [<ffffffff8109eccc>] ? finish_task_switch+0x7c/0x120
      [   46.657004]  [<ffffffff816dad58>] ? retint_swapgs+0x13/0x1b
      [   46.657004]  [<ffffffff8106d139>] do_group_exit+0x49/0xc0
      [   46.657004]  [<ffffffff8106d1c4>] sys_exit_group+0x14/0x20
      [   46.657004]  [<ffffffff816e3b19>] system_call_fastpath+0x16/0x1b
      [   46.657004] ---[ end trace 4468c44e2156e7d1 ]---
      [   46.657004] Mapped at:
      [   46.657004]  [<ffffffff813663d1>] debug_dma_map_page+0x91/0x140
      [   46.657004]  [<ffffffffa030e8eb>] e100_xmit_prepare+0x12b/0x1c0 [e100]
      [   46.657004]  [<ffffffffa030c924>] e100_exec_cb+0x84/0x140 [e100]
      [   46.657004]  [<ffffffffa030e56a>] e100_xmit_frame+0x3a/0x190 [e100]
      [   46.657004]  [<ffffffff8159ee89>] dev_hard_start_xmit+0x259/0x6c0
      
      Easy fix, modify the cb paramter to e100_exec_cb to return an error, and do the
      dma_mapping_error check in the obvious place
      
      This was reported previously here:
      http://article.gmane.org/gmane.linux.network/257893
      
      But nobody stepped up and fixed it.
      
      CC: Josh Boyer <jwboyer@redhat.com>
      CC: e1000-devel@lists.sourceforge.net
      Signed-off-by: NNeil Horman <nhorman@tuxdriver.com>
      Reported-by: NMichal Jaegermann <michal@harddata.com>
      Tested-by: NAaron Brown <aaron.f.brown@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      61a0f6ef
  4. 10 4月, 2013 1 次提交
  5. 09 4月, 2013 7 次提交
  6. 08 4月, 2013 2 次提交
  7. 07 4月, 2013 1 次提交
  8. 06 4月, 2013 2 次提交
  9. 05 4月, 2013 11 次提交
  10. 04 4月, 2013 7 次提交
    • B
      HID: magicmouse: fix race between input_register() and probe() · f1a9a149
      Benjamin Tissoires 提交于
      Since kernel 3.7, it appears that the input registration occured before
      the end of magicmouse_setup_input(). This is shown by receiving a lot of
      "EV_SYN SYN_REPORT 1" instead of normal "EV_SYN SYN_REPORT 0".
      This value means that the output buffer is full, and the user space
      is loosing events.
      
      Using .input_configured guarantees that the race is not occuring, and that
      the call of "input_set_events_per_packet(input, 60)" is taken into account
      by input_register().
      
      Fixes:
      https://bugzilla.redhat.com/show_bug.cgi?id=908604
      
      Cc: stable@vger.kernel.org
      Reported-and-Tested-By: NClarke Wixon <cwixon@usa.net>
      Signed-off-by: NBenjamin Tissoires <benjamin.tissoires@redhat.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      f1a9a149
    • J
      mtip32xx: fix two smatch warnings · c66bb3f0
      Jens Axboe 提交于
      Dan reports:
      
      New smatch warnings:
      drivers/block/mtip32xx/mtip32xx.c:2728 show_device_status() warn: variable dereferenced before check 'dd' (see line 2727)
      drivers/block/mtip32xx/mtip32xx.c:2758 show_device_status() warn: variable dereferenced before check 'dd' (see line 2757)
      
      which are checking if dd == NULL, in a list_for_each_entry() type loop.
      Get rid of the check, dd can never be NULL here.
      Reported-by: NDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      c66bb3f0
    • K
      [libata] Fix HDIO_DRIVE_* ioctl() Linux 3.9 regression · 6d3bfc7b
      Krzysztof Mazur 提交于
      On Mon, Mar 25, 2013 at 06:26:50PM +0100, Ronald wrote:
      > In reply to [1]: I have the same issue. Git bisect took 50+ rebuilds xD
      >
      > Smartd does not work anymore since 84a9a8cd ([libata] Set proper SK
      > when CK_COND is set.).
      
      > [1] http://www.spinics.net/lists/linux-ide/msg45268.html
      
      It seems that the SAM_STAT_CHECK_CONDITION is not cleared
      causing -EIO, because that patch modified sensebuf and
      the check for clearing SAM_STAT_CHECK_CONDITION is no longer valid.
      
      Fix that.
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      6d3bfc7b
    • D
      libata: fix DMA to stack in reading devslp_timing parameters · 8e725c7f
      David Woodhouse 提交于
      Commit 803739d2 ("[libata] replace
      sata_settings with devslp_timing"), which was also Cc: stable, used a
      stack buffer to receive data from ata_read_log_page(), which triggers
      the following warning:
       ahci 0000:00:1f.2: DMA-API: device driver maps memory fromstack [addr=ffff880140469948]
      
      Fix this by using ap->sector_buf instead of a stack buffer.
      Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
      Cc: stable@kernel.org
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      8e725c7f
    • Y
      ata_piix: Fix DVD not dectected at some Haswell platforms · b55f84e2
      Youquan Song 提交于
      There is a quirk patch 5e5a4f5d
      "ata_piix: make DVD Drive recognisable on systems with Intel Sandybridge
       chipsets(v2)" fixing the 4 ports IDE controller 32bit PIO mode.
      
      We've hit a problem with DVD not recognized on Haswell Desktop platform which
      includes Lynx Point 2-port SATA controller.
      
      This quirk patch disables 32bit PIO on this controller in IDE mode.
      
      v2: Change spelling error in statememnt pointed by Sergei Shtylyov.
      v3: Change comment statememnt and spliting line over 80 characters pointed by
          Libor Pechacek and also rebase the patch against 3.8-rc7 kernel.
      Tested-by: NLee, Chun-Yi <jlee@suse.com>
      Signed-off-by: NYouquan Song <youquan.song@intel.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      b55f84e2
    • S
      libata: Set max sector to 65535 for Slimtype DVD A DS8A8SH drive · a32450e1
      Shan Hai 提交于
      The Slimtype DVD A  DS8A8SH drive locks up when max sector is smaller than
      65535, and the blow backtrace is observed on locking up:
      
      INFO: task flush-8:32:1130 blocked for more than 120 seconds.
      "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
      flush-8:32      D ffffffff8180cf60     0  1130      2 0x00000000
       ffff880273aef618 0000000000000046 0000000000000005 ffff880273aee000
       ffff880273aee000 ffff880273aeffd8 ffff880273aee010 ffff880273aee000
       ffff880273aeffd8 ffff880273aee000 ffff88026e842ea0 ffff880274a10000
      Call Trace:
       [<ffffffff8168fc2d>] schedule+0x5d/0x70
       [<ffffffff8168fccc>] io_schedule+0x8c/0xd0
       [<ffffffff81324461>] get_request+0x731/0x7d0
       [<ffffffff8133dc60>] ? cfq_allow_merge+0x50/0x90
       [<ffffffff81083aa0>] ? wake_up_bit+0x40/0x40
       [<ffffffff81320443>] ? bio_attempt_back_merge+0x33/0x110
       [<ffffffff813248ea>] blk_queue_bio+0x23a/0x3f0
       [<ffffffff81322176>] generic_make_request+0xc6/0x120
       [<ffffffff81322308>] submit_bio+0x138/0x160
       [<ffffffff811d7596>] ? bio_alloc_bioset+0x96/0x120
       [<ffffffff811d1f61>] submit_bh+0x1f1/0x220
       [<ffffffff811d48b8>] __block_write_full_page+0x228/0x340
       [<ffffffff811d3650>] ? attach_nobh_buffers+0xc0/0xc0
       [<ffffffff811d8960>] ? I_BDEV+0x10/0x10
       [<ffffffff811d8960>] ? I_BDEV+0x10/0x10
       [<ffffffff811d4ab6>] block_write_full_page_endio+0xe6/0x100
       [<ffffffff811d4ae5>] block_write_full_page+0x15/0x20
       [<ffffffff811d9268>] blkdev_writepage+0x18/0x20
       [<ffffffff81142527>] __writepage+0x17/0x40
       [<ffffffff811438ba>] write_cache_pages+0x34a/0x4a0
       [<ffffffff81142510>] ? set_page_dirty+0x70/0x70
       [<ffffffff81143a61>] generic_writepages+0x51/0x80
       [<ffffffff81143ab0>] do_writepages+0x20/0x50
       [<ffffffff811c9ed6>] __writeback_single_inode+0xa6/0x2b0
       [<ffffffff811ca861>] writeback_sb_inodes+0x311/0x4d0
       [<ffffffff811caaa6>] __writeback_inodes_wb+0x86/0xd0
       [<ffffffff811cad43>] wb_writeback+0x1a3/0x330
       [<ffffffff816916cf>] ? _raw_spin_lock_irqsave+0x3f/0x50
       [<ffffffff811b8362>] ? get_nr_inodes+0x52/0x70
       [<ffffffff811cb0ac>] wb_do_writeback+0x1dc/0x260
       [<ffffffff8168dd34>] ? schedule_timeout+0x204/0x240
       [<ffffffff811cb232>] bdi_writeback_thread+0x102/0x2b0
       [<ffffffff811cb130>] ? wb_do_writeback+0x260/0x260
       [<ffffffff81083550>] kthread+0xc0/0xd0
       [<ffffffff81083490>] ? kthread_worker_fn+0x1b0/0x1b0
       [<ffffffff8169a3ec>] ret_from_fork+0x7c/0xb0
       [<ffffffff81083490>] ? kthread_worker_fn+0x1b0/0x1b0
      
       The above trace was triggered by
         "dd if=/dev/zero of=/dev/sr0 bs=2048 count=32768"
      
       It was previously working by accident, since another bug introduced
       by 4dce8ba9 (libata: Use 'bool' return value for ata_id_XXX) caused
       all drives to use maxsect=65535.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NShan Hai <shan.hai@windriver.com>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      a32450e1
    • R
      PCI/PM: Disable runtime PM of PCIe ports · de7d5f72
      Rafael J. Wysocki 提交于
      The runtime PM of PCIe ports turns out to be quite fragile, as in
      some cases things work while in some other cases they don't and we
      don't seem to have a good way to determine whether or not they are
      going to work in advance.
      
      For this reason, avoid enabling runtime PM for PCIe ports by
      keeping their runtime PM reference counters always above 0 for the
      time being.
      
      When a PCIe port is suspended, it can no longer report events like
      hotplug, so hotplug below the port may not work, as in the bug
      report below.
      
      [bhelgaas: changelog, stable]
      Reference: https://bugzilla.kernel.org/show_bug.cgi?id=53811Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      CC: stable@vger.kernel.org	# v3.6+
      de7d5f72