1. 17 2月, 2010 2 次提交
    • L
      USB: usbfs: properly clean up the as structure on error paths · ddeee0b2
      Linus Torvalds 提交于
      I notice that the processcompl_compat() function seems to be leaking the
      'struct async *as' in the error paths. 
      
      I think that the calling convention is fundamentally buggered. The
      caller is the one that did the "reap_as()" to get the as thing, the
      caller should be the one to free it too. 
      
      Freeing it in the caller also means that it very clearly always gets
      freed, and avoids the need for any "free in the error case too".
      
      From: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Cc: Marcus Meissner <meissner@suse.de>
      Cc: stable <stable@kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      ddeee0b2
    • G
      USB: usbfs: only copy the actual data received · d4a4683c
      Greg KH 提交于
      We need to only copy the data received by the device to userspace, not
      the whole kernel buffer, which can contain "stale" data.
      
      Thanks to Marcus Meissner for pointing this out and testing the fix.
      Reported-by: NMarcus Meissner <meissner@suse.de>
      Tested-by: NMarcus Meissner <meissner@suse.de>
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: stable <stable@kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      d4a4683c
  2. 16 2月, 2010 11 次提交
  3. 15 2月, 2010 6 次提交
  4. 14 2月, 2010 3 次提交
    • C
      firewire: ohci: retransmit isochronous transmit packets on cycle loss · 7f51a100
      Clemens Ladisch 提交于
      In isochronous transmit DMA descriptors, link the skip address pointer
      back to the descriptor itself.  When a cycle is lost, the controller
      will send the packet in the next cycle, instead of terminating the
      entire DMA program.
      
      There are two reasons for this:
      
      * This behaviour is compatible with the old IEEE1394 stack.  Old
        applications would not expect the DMA program to stop in this case.
      
      * Since the OHCI driver does not report any uncompleted packets, the
        context would stop silently; clients would not have any chance to
        detect and handle this error without a watchdog timer.
      Signed-off-by: NClemens Ladisch <clemens@ladisch.de>
      
      Pieter Palmers notes:
      
      "The reason I added this retry behavior to the old stack is because some
      cards now and then fail to send a packet (e.g. the o2micro card in my
      dell laptop).  I couldn't figure out why exactly this happens, my best
      guess is that the card cannot fetch the payload data on time.  This
      happens much more frequently when sending large packets, which leads me
      to suspect that there are some contention issues with the DMA that fills
      the transmit FIFO.
      
      In the old stack it was a pretty critical issue as it resulted in a
      freeze of the userspace application.
      
      The omission of a packet doesn't necessarily have to be an issue.  E.g.
      in IEC61883 streams the DBC field can be used to detect discontinuities
      in the stream.  So as long as the other side doesn't bail when no
      [packet] is present in a cycle, there is not really a problem.
      
      I'm not convinced though that retrying is the proper solution, but it is
      simple and effective for what it had to do.  And I think there are no
      reasons not to do it this way.  Userspace can still detect this by
      checking the cycle the descriptor was sent in."
      
      Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> (changelog, comment)
      7f51a100
    • K
      perf top: Fix help text alignment · 1a72cfa6
      Kirill Smelkov 提交于
      Print this:
      
      Mapped keys:
              [d]     display refresh delay.                  (2)
              [e]     display entries (lines).                (46)
              [f]     profile display filter (count).         (5)
              [F]     annotate display filter (percent).      (5%)
              [s]     annotate symbol.                        (NULL)
              [S]     stop annotation.
              [K]     hide kernel_symbols symbols.            (no)
              [U]     hide user symbols.                      (no)
              [z]     toggle sample zeroing.                  (0)
              [qQ]    quit.
      
      instead of:
      
      Mapped keys:
              [d]     display refresh delay.                  (2)
              [e]     display entries (lines).                (46)
              [f]     profile display filter (count).         (5)
              [F]     annotate display filter (percent).      (5%)
              [s]     annotate symbol.                        (NULL)
              [S]     stop annotation.
              [K]     hide kernel_symbols symbols.                    (no)
              [U]     hide user symbols.                      (no)
              [z]     toggle sample zeroing.                  (0)
              [qQ]    quit.
      Signed-off-by: NKirill Smelkov <kirr@landau.phys.spbu.ru>
      Acked-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      LKML-Reference: <20100212162059.GA30041@landau.phys.spbu.ru>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      1a72cfa6
    • H
      tracing/kprobes: Fix probe parsing · a9bb18f3
      Heiko Carstens 提交于
      Trying to add a probe like:
      
        echo p:myprobe 0x10000 > /sys/kernel/debug/tracing/kprobe_events
      
      will fail since the wrong pointer is passed to strict_strtoul
      when trying to convert the address to an unsigned long.
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Acked-by: NMasami Hiramatsu <mhiramat@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      LKML-Reference: <20100210162346.GA6933@osiris.boeblingen.de.ibm.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      a9bb18f3
  5. 13 2月, 2010 9 次提交
  6. 12 2月, 2010 9 次提交