1. 11 8月, 2010 9 次提交
  2. 10 8月, 2010 23 次提交
  3. 09 8月, 2010 8 次提交
    • C
      CRIS: ioctl for getting RS485 information · f1d23ed8
      Claudio Scordino 提交于
      Add ioctl to CRIS serial driver to get RS485 data from user-space.
      Signed-off-by: NClaudio Scordino <claudio@evidence.eu.com>
      Signed-off-by: NJesper Nilsson <jesper.nilsson@axis.com>
      f1d23ed8
    • T
      drm: fix fallouts from slow-work -> wq conversion · 9a919c46
      Tejun Heo 提交于
      Commit 991ea75c (drm: use workqueue instead of slow-work), which made
      drm to use wq instead of slow-work, didn't account for the return
      value difference between delayed_slow_work_enqueue() and
      queue_delayed_work().  The former returns 0 on success and -errno on
      failures while the latter never fails and only uses the return value
      to indicate whether the work was already pending or not.
      
      This misconversion triggered spurious error messages.  Remove the now
      unnecessary return value check and error message.
      
      Markus: caught another incorrect conversion in drm_kms_helper_poll_enable()
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Reported-by: NMarkus Trippelsdorf <markus@trippelsdorf.de>
      Tested-by: NMarkus Trippelsdorf <markus@trippelsdorf.de>
      Cc: David Airlie <airlied@linux.ie>
      Cc: dri-devel@lists.freedesktop.org
      9a919c46
    • A
      tx493xide: use min_t() macro instead of min() · cd078af6
      Atsushi Nemoto 提交于
      This fixes a warning ("comparison of distinct pointer types lacks a
      cast") introduced by the commit
      040f6b4f ("tx493xide: use ->pio_mode
      value to determine pair device speed").
      Signed-off-by: NAtsushi Nemoto <anemo@mba.ocn.ne.jp>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      cd078af6
    • J
      drivers/ide: Use memdup_user · 7d543d84
      Julia Lawall 提交于
      Use memdup_user when user data is immediately copied into the
      allocated region.
      
      The semantic patch that makes this change is as follows:
      (http://coccinelle.lip6.fr/)
      
      // <smpl>
      @@
      expression from,to,size,flag;
      position p;
      identifier l1,l2;
      @@
      
      -  to = \(kmalloc@p\|kzalloc@p\)(size,flag);
      +  to = memdup_user(from,size);
         if (
      -      to==NULL
      +      IS_ERR(to)
                       || ...) {
         <+... when != goto l1;
      -  -ENOMEM
      +  PTR_ERR(to)
         ...+>
         }
      -  if (copy_from_user(to, from, size) != 0) {
      -    <+... when != goto l2;
      -    -EFAULT
      -    ...+>
      -  }
      // </smpl>
      Signed-off-by: NJulia Lawall <julia@diku.dk>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7d543d84
    • Y
      via82cxxx: fix typo for VT6415 PCIE PATA IDE Host Controller support. · 2a800b7b
      Yann Dirson 提交于
      Without this fix, init of the via82cxxx driver causes a oops with a
      stack resembling the one below, and the boot blocks between init of
      USB devices and launch of init (was easy to bisect by booting with
      init=/bin/sh).
      
       Pid: 279, comm: work_for_cpu Not tainted 2.6.34.1-00003-ga42ea77 #2
       Call Trace:
        [<ffffffff81045691>] ? warn_slowpath_common+0x76/0x8c
        [<ffffffff810456f9>] ? warn_slowpath_fmt+0x40/0x45
        [<ffffffff812eb5a1>] ? printk+0x40/0x47
        [<ffffffff8108e1fd>] ? enable_irq+0x3e/0x64
        [<ffffffffa0003900>] ? ide_probe_port+0x55c/0x589 [ide_core]
        [<ffffffffa0003f22>] ? ide_host_register+0x273/0x628 [ide_core]
        [<ffffffffa00083e3>] ? ide_pci_init_two+0x4da/0x5c5 [ide_core]
        [<ffffffff8106117e>] ? up+0xe/0x36
        [<ffffffff81045d7e>] ? release_console_sem+0x17e/0x1ae
        [<ffffffff812d945b>] ? klist_iter_exit+0x14/0x1e
        [<ffffffff8120ed23>] ? bus_find_device+0x75/0x83
        [<ffffffffa0022832>] ? via_init_one+0x269/0x28a [via82cxxx]
        [<ffffffffa00223a2>] ? init_chipset_via82cxxx+0x0/0x1ea [via82cxxx]
        [<ffffffff81059f25>] ? do_work_for_cpu+0x0/0x1b
        [<ffffffff81190c65>] ? local_pci_probe+0x12/0x16
        [<ffffffff81059f30>] ? do_work_for_cpu+0xb/0x1b
        [<ffffffff8105d0dd>] ? kthread+0x75/0x7d
        [<ffffffff810097e4>] ? kernel_thread_helper+0x4/0x10
        [<ffffffff8105d068>] ? kthread+0x0/0x7d
        [<ffffffff810097e0>] ? kernel_thread_helper+0x0/0x10
       ---[ end trace 89c8cb70379b5bda ]---
      
      The typo was introduced in a354ae87,
      and affects 2.6.33-rc4 and later.
      Signed-off-by: NYann Dirson <ydirson@altern.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2a800b7b
    • B
      ide-cd: Do not access completed requests in the irq handler · 11071282
      Borislav Petkov 提交于
      ide_cd_error_cmd() can complete an erroneous request with leftover
      buffers. Signal this with its return value so that the request is not
      accessed after its completion in the irq handler and we oops.
      
      Cc: <stable@kernel.org> # 32.x 33.x 34.x
      Signed-off-by: NBorislav Petkov <bp@alien8.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      11071282
    • B
      Revert "Input: appletouch - fix integer overflow issue" · 6e49c1a4
      Benjamin Herrenschmidt 提交于
      This reverts commit 04b4b88c.
      
      While the original problem only caused a slight disturbance on the
      edge of the touchpad, the commit above to "fix" it completely breaks
      operation on some other models such as mine.
      
      We'll sort this out separately, revert the patch for now.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      6e49c1a4
    • J
      e100/e1000*/igb*/ixgb*: Add missing read memory barrier · 2d0bb1c1
      Jeff Kirsher 提交于
      Based on patches from Sonny Rao and Milton Miller...
      
      Combined the patches to fix up clean_tx_irq and clean_rx_irq.
      
      The PowerPC architecture does not require loads to independent bytes
      to be ordered without adding an explicit barrier.
      
      In ixgbe_clean_rx_irq we load the status bit then load the packet data.
      With packet split disabled if these loads go out of order we get a
      stale packet, but we will notice the bad sequence numbers and drop it.
      
      The problem occurs with packet split enabled where the TCP/IP header
      and data are in different descriptors. If the reads go out of order
      we may have data that doesn't match the TCP/IP header. Since we use
      hardware checksumming this bad data is never verified and it makes it
      all the way to the application.
      
      This bug was found during stress testing and adding this barrier has
      been shown to fix it.  The bug can manifest as a data integrity issue
      (bad payload data) or as a BUG in skb_pull().
      
      This was a nasty bug to hunt down, if people agree with the fix I think
      it's a candidate for stable.
      
      Previously Submitted to e1000-devel only for ixgbe
      
      http://marc.info/?l=e1000-devel&m=126593062701537&w=3
      
      We've now seen this problem hit with other device drivers (e1000e mostly)
      So I'm resubmitting with fixes for other Intel Device Drivers with
      similar issues.
      
      CC: Milton Miller <miltonm@bga.com>
      CC: Anton Blanchard <anton@samba.org>
      CC: Sonny Rao <sonnyrao@us.ibm.com>
      CC: stable <stable@kernel.org>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2d0bb1c1