1. 17 2月, 2010 3 次提交
    • J
      dm log: userspace fix overhead_size calcuations · ebfd32bb
      Jonathan Brassow 提交于
      This patch fixes two bugs that revolve around the miscalculation and
      misuse of the variable 'overhead_size'.  'overhead_size' is the size of
      the various header structures used during communication.
      
      The first bug is the use of 'sizeof' with the pointer of a structure
      instead of the structure itself - resulting in the wrong size being
      computed.  This is then used in a check to see if the payload
      (data_size) would be to large for the preallocated structure.  Since the
      bug produces a smaller value for the overhead, it was possible for the
      structure to be breached.  (Although the current users of the code do
      not currently send enough data to trigger this bug.)
      
      The second bug is that the 'overhead_size' value is used to compute how
      much of the preallocated space should be cleared before populating it
      with fresh data.  This should have simply been 'sizeof(struct cn_msg)'
      not overhead_size.  The fact that 'overhead_size' was computed
      incorrectly made this problem "less bad" - leaving only a pointer's
      worth of space at the end uncleared.  Thus, this bug was never producing
      a bad result, but still needs to be fixed - especially now that the
      value is computed correctly.
      
      Cc: stable@kernel.org
      Signed-off-by: Jonathan Brassow <jbrassow@redhat.com
      Signed-off-by: NAlasdair G Kergon <agk@redhat.com>
      ebfd32bb
    • M
      dm snapshot: persistent annotate work_queue as on stack · 55f67f2d
      Mike Snitzer 提交于
      chunk_io() declares its 'struct mdata_req' on the stack and then
      initializes its 'struct work_struct' member.  Annotate the
      initialization of this workqueue with INIT_WORK_ON_STACK to suppress a
      debugobjects warning seen when CONFIG_DEBUG_OBJECTS_WORK is enabled.
      Signed-off-by: NMike Snitzer <snitzer@redhat.com>
      Signed-off-by: NAlasdair G Kergon <agk@redhat.com>
      55f67f2d
    • N
      dm stripe: avoid divide by zero with invalid stripe count · 781248c1
      Nikanth Karthikesan 提交于
      If a table containing zero as stripe count is passed into stripe_ctr
      the code attempts to divide by zero.
      
      This patch changes DM_TABLE_LOAD to return -EINVAL if the stripe count
      is zero.
      
      We now get the following error messages:
        device-mapper: table: 253:0: striped: Invalid stripe count
        device-mapper: ioctl: error adding target to table
      Signed-off-by: NNikanth Karthikesan <knikanth@suse.de>
      Cc: stable@kernel.org
      Signed-off-by: NAlasdair G Kergon <agk@redhat.com>
      781248c1
  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 8 次提交