Skip to content
  1. Feb 17, 2010
    • Linus Torvalds's avatar
      USB: usbfs: properly clean up the as structure on error paths · ddeee0b2
      Linus Torvalds authored
      
      
      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: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      ddeee0b2
    • Greg Kroah-Hartman's avatar
      USB: usbfs: only copy the actual data received · d4a4683c
      Greg Kroah-Hartman authored
      
      
      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: default avatarMarcus Meissner <meissner@suse.de>
      Tested-by: default avatarMarcus 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: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      d4a4683c
  2. Feb 16, 2010
  3. Feb 15, 2010
  4. Feb 14, 2010
    • Clemens Ladisch's avatar
      firewire: ohci: retransmit isochronous transmit packets on cycle loss · 7f51a100
      Clemens Ladisch authored
      
      
      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: default avatarClemens 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
    • Kirill Smelkov's avatar
      perf top: Fix help text alignment · 1a72cfa6
      Kirill Smelkov authored
      
      
      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: default avatarKirill Smelkov <kirr@landau.phys.spbu.ru>
      Acked-by: default avatarArnaldo 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: default avatarIngo Molnar <mingo@elte.hu>
      1a72cfa6
    • Heiko Carstens's avatar
      tracing/kprobes: Fix probe parsing · a9bb18f3
      Heiko Carstens authored
      
      
      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: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
      Acked-by: default avatarMasami 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: default avatarIngo Molnar <mingo@elte.hu>
      a9bb18f3
  5. Feb 13, 2010
  6. Feb 12, 2010