1. 16 Jun, 2007 6 commits
  2. 15 Jun, 2007 1 commit
  3. 14 Jun, 2007 3 commits
  4. 13 Jun, 2007 5 commits
  5. 11 Jun, 2007 7 commits
  6. 14 Jun, 2007 2 commits
  7. 10 Jun, 2007 4 commits
  8. 09 Jun, 2007 5 commits
    • G. Liakhovetski's avatar
      [IrDA]: Fix Rx/Tx path race. · c0cfe7fa
      G. Liakhovetski authored
      
      
      From: G. Liakhovetski <gl@dsa-ac.de>
      
      We need to switch to NRM _before_ sending the final packet otherwise
      we might hit a race condition where we get the first packet from the
      peer while we're still in LAP_XMIT_P.
      Signed-off-by: default avatarSamuel Ortiz <samuel@sortiz.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c0cfe7fa
    • Robert P. J. Day's avatar
      Protect <linux/console_struct.h> from multiple inclusion · 217397d7
      Robert P. J. Day authored
      
      
      Prevent <linux/console_struct.h> from being included more than once,
      otherwise you get a redefinition error if you happen to include
      <linux/vt_kern.h> first.
      Signed-off-by: default avatarRobert P. J. Day <rpjday@mindspring.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      217397d7
    • Randy Dunlap's avatar
      hexdump: more output formatting · c7909234
      Randy Dunlap authored
      
      
      Add a prefix string parameter.  Callers are responsible for any string
      length/alignment that they want to see in the output.  I.e., callers should
      pad strings to achieve alignment if they want that.
      
      Add rowsize parameter.  This is the number of raw data bytes to be printed
      per line.  Must be 16 or 32.
      
      Add a groupsize parameter.  This allows callers to dump values as 1-byte,
      2-byte, 4-byte, or 8-byte numbers.  Default is 1-byte numbers.  If the
      total length is not an even multiple of groupsize, 1-byte numbers are
      printed.
      
      Add an "ascii" output parameter.  This causes ASCII data output following
      the hex data output.
      
      Clean up some doc examples.
      
      Align the ASCII output on all lines that are produced by one call.
      
      Add a new interface, print_hex_dump_bytes(), that is a shortcut to
      print_hex_dump(), using default parameter values to print 16 bytes in
      byte-size chunks of hex + ASCII output, using printk level KERN_DEBUG.
      Signed-off-by: default avatarRandy Dunlap <randy.dunlap@oracle.com>
      Cc: Christoph Lameter <clameter@sgi.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      c7909234
    • Alexey Kuznetsov's avatar
      pi-futex: fix exit races and locking problems · 778e9a9c
      Alexey Kuznetsov authored
      
      
      1. New entries can be added to tsk->pi_state_list after task completed
         exit_pi_state_list(). The result is memory leakage and deadlocks.
      
      2. handle_mm_fault() is called under spinlock. The result is obvious.
      
      3. results in self-inflicted deadlock inside glibc.
         Sometimes futex_lock_pi returns -ESRCH, when it is not expected
         and glibc enters to for(;;) sleep() to simulate deadlock. This problem
         is quite obvious and I think the patch is right. Though it looks like
         each "if" in futex_lock_pi() got some stupid special case "else if". :-)
      
      4. sometimes futex_lock_pi() returns -EDEADLK,
         when nobody has the lock. The reason is also obvious (see comment
         in the patch), but correct fix is far beyond my comprehension.
         I guess someone already saw this, the chunk:
      
                              if (rt_mutex_trylock(&q.pi_state->pi_mutex))
                                      ret = 0;
      
         is obviously from the same opera. But it does not work, because the
         rtmutex is really taken at this point: wake_futex_pi() of previous
         owner reassigned it to us. My fix works. But it looks very stupid.
         I would think about removal of shift of ownership in wake_futex_pi()
         and making all the work in context of process taking lock.
      
      From: Thomas Gleixner <tglx@linutronix.de>
      
      Fix 1) Avoid the tasklist lock variant of the exit race fix by adding
          an additional state transition to the exit code.
      
          This fixes also the issue, when a task with recursive segfaults
          is not able to release the futexes.
      
      Fix 2) Cleanup the lookup_pi_state() failure path and solve the -ESRCH
          problem finally.
      
      Fix 3) Solve the fixup_pi_state_owner() problem which needs to do the fixup
          in the lock protected section by using the in_atomic userspace access
          functions.
      
          This removes also the ugly lock drop / unqueue inside of fixup_pi_state()
      
      Fix 4) Fix a stale lock in the error path of futex_wake_pi()
      
      Added some error checks for verification.
      
      The -EDEADLK problem is solved by the rtmutex fixups.
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Acked-by: default avatarIngo Molnar <mingo@elte.hu>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Ulrich Drepper <drepper@redhat.com>
      Cc: Eric Dumazet <dada1@cosmosbay.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      778e9a9c
    • Christoph Lameter's avatar
      SLUB: return ZERO_SIZE_PTR for kmalloc(0) · 272c1d21
      Christoph Lameter authored
      
      
      Instead of returning the smallest available object return ZERO_SIZE_PTR.
      
      A ZERO_SIZE_PTR can be legitimately used as an object pointer as long as it
      is not deferenced.  The dereference of ZERO_SIZE_PTR causes a distinctive
      fault.  kfree can handle a ZERO_SIZE_PTR in the same way as NULL.
      
      This enables functions to use zero sized object. e.g. n = number of objects.
      
      	objects = kmalloc(n * sizeof(object));
      
      	for (i = 0; i < n; i++)
      		objects[i].x = y;
      
      	kfree(objects);
      Signed-off-by: default avatarChristoph Lameter <clameter@sgi.com>
      Acked-by: default avatarPekka Enberg <penberg@cs.helsinki.fi>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      272c1d21
  9. 08 Jun, 2007 7 commits