1. 18 Dec, 2009 6 commits
    • Paul E. McKenney's avatar
      rcu: Fix note_new_gpnum() uses of ->gpnum · c541f7c7
      Paul E. McKenney authored
      commit 9160306e upstream.
      
      Impose a clear locking design on the note_new_gpnum()
      function's use of the ->gpnum counter.  This is done by updating
      rdp->gpnum only from the corresponding leaf rcu_node structure's
      rnp->gpnum field, and even then only under the protection of
      that same rcu_node structure's ->lock field.  Performance and
      scalability are maintained using a form of double-checked
      locking, and excessive spinning is avoided by use of the
      spin_trylock() function.  The use of spin_trylock() is safe due
      to the fact that CPUs who fail to acquire this lock will try
      again later. The hierarchical nature of the rcu_node data
      structure limits contention (which could be limited further if
      need be using the RCU_FANOUT kernel parameter).
      
      Without this patch, obscure but quite possible races could
      result in a quiescent state that occurred during one grace
      period to be accounted to the following grace period, causing
      this following grace period to end prematurely.  Not good!
      Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      Cc: laijs@cn.fujitsu.com
      Cc: dipankar@in.ibm.com
      Cc: mathieu.desnoyers@polymtl.ca
      Cc: josh@joshtriplett.org
      Cc: dvhltc@us.ibm.com
      Cc: niv@us.ibm.com
      Cc: peterz@infradead.org
      Cc: rostedt@goodmis.org
      Cc: Valdis.Kletnieks@vt.edu
      Cc: dhowells@redhat.com
      LKML-Reference: <12571987492350-git-send-email->
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      c541f7c7
    • Paul E. McKenney's avatar
      rcu: Fix synchronization for rcu_process_gp_end() uses of ->completed counter · 1a0d7df3
      Paul E. McKenney authored
      commit d09b62df upstream.
      
      Impose a clear locking design on the rcu_process_gp_end()
      function's use of the ->completed counter.  This is done by
      creating a ->completed field in the rcu_node structure, which
      can safely be accessed under the protection of that structure's
      lock.  Performance and scalability are maintained by using a
      form of double-checked locking, so that rcu_process_gp_end()
      only acquires the leaf rcu_node structure's ->lock if a grace
      period has recently ended.
      
      This fix reduces rcutorture failure rate by at least two orders
      of magnitude under heavy stress with force_quiescent_state()
      being invoked artificially often.  Without this fix,
      unsynchronized access to the ->completed field can cause
      rcu_process_gp_end() to advance callbacks whose grace period has
      not yet expired.  (Bad idea!)
      Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      Cc: laijs@cn.fujitsu.com
      Cc: dipankar@in.ibm.com
      Cc: mathieu.desnoyers@polymtl.ca
      Cc: josh@joshtriplett.org
      Cc: dvhltc@us.ibm.com
      Cc: niv@us.ibm.com
      Cc: peterz@infradead.org
      Cc: rostedt@goodmis.org
      Cc: Valdis.Kletnieks@vt.edu
      Cc: dhowells@redhat.com
      LKML-Reference: <12571987494069-git-send-email->
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      1a0d7df3
    • Paul E. McKenney's avatar
      rcu: Prepare for synchronization fixes: clean up for non-NO_HZ handling of ->completed counter · 1aab3863
      Paul E. McKenney authored
      commit 281d150c upstream.
      
      Impose a clear locking design on non-NO_HZ handling of the
      ->completed counter.  This increases the distance between the
      RCU and the CPU-hotplug mechanisms.
      Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      Cc: laijs@cn.fujitsu.com
      Cc: dipankar@in.ibm.com
      Cc: mathieu.desnoyers@polymtl.ca
      Cc: josh@joshtriplett.org
      Cc: dvhltc@us.ibm.com
      Cc: niv@us.ibm.com
      Cc: peterz@infradead.org
      Cc: rostedt@goodmis.org
      Cc: Valdis.Kletnieks@vt.edu
      Cc: dhowells@redhat.com
      LKML-Reference: <12571987491353-git-send-email->
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      1aab3863
    • Jay Fenlason's avatar
      firewire: ohci: handle receive packets with a data length of zero · e39b7b49
      Jay Fenlason authored
      commit 8c0c0cc2 upstream.
      
      Queueing to receive an ISO packet with a payload length of zero
      silently does nothing in dualbuffer mode, and crashes the kernel in
      packet-per-buffer mode.  Return an error in dualbuffer mode, because
      the DMA controller won't let us do what we want, and work correctly in
      packet-per-buffer mode.
      Signed-off-by: default avatarJay Fenlason <fenlason@redhat.com>
      Signed-off-by: default avatarStefan Richter <stefanr@s5r6.in-berlin.de>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      e39b7b49
    • zhao.ming9@zte.com.cn's avatar
      USB: option: add pid for ZTE · be58b871
      zhao.ming9@zte.com.cn authored
      commit 8d87cacd upstream.
      
      This patch adds ZTE modem devices.
      Signed-off-by: default avatarMing Zhao <zhao.ming9@zte.com.cn>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      be58b871
    • Alan Stern's avatar
      USB: usb-storage: fix bug in fill_inquiry · 5a2ec9e5
      Alan Stern authored
      commit f3f6faa9 upstream.
      
      This patch (as1312) fixes a minor bug in usb-storage.  The
      fill_inquiry() routine neglects to pre-load the inquiry data buffer
      with spaces.  As a result, if the vendor name is shorter than 8
      characters or the product name is shorter than 16, the remainder will
      be filled with garbage.
      
      The patch also removes some unnecessary calls to strlen().
      Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      5a2ec9e5
  2. 14 Dec, 2009 34 commits