1. 05 8月, 2010 1 次提交
  2. 30 3月, 2010 1 次提交
    • T
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking... · 5a0e3ad6
      Tejun Heo 提交于
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
      
      percpu.h is included by sched.h and module.h and thus ends up being
      included when building most .c files.  percpu.h includes slab.h which
      in turn includes gfp.h making everything defined by the two files
      universally available and complicating inclusion dependencies.
      
      percpu.h -> slab.h dependency is about to be removed.  Prepare for
      this change by updating users of gfp and slab facilities include those
      headers directly instead of assuming availability.  As this conversion
      needs to touch large number of source files, the following script is
      used as the basis of conversion.
      
        http://userweb.kernel.org/~tj/misc/slabh-sweep.py
      
      The script does the followings.
      
      * Scan files for gfp and slab usages and update includes such that
        only the necessary includes are there.  ie. if only gfp is used,
        gfp.h, if slab is used, slab.h.
      
      * When the script inserts a new include, it looks at the include
        blocks and try to put the new include such that its order conforms
        to its surrounding.  It's put in the include block which contains
        core kernel includes, in the same order that the rest are ordered -
        alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
        doesn't seem to be any matching order.
      
      * If the script can't find a place to put a new include (mostly
        because the file doesn't have fitting include block), it prints out
        an error message indicating which .h file needs to be added to the
        file.
      
      The conversion was done in the following steps.
      
      1. The initial automatic conversion of all .c files updated slightly
         over 4000 files, deleting around 700 includes and adding ~480 gfp.h
         and ~3000 slab.h inclusions.  The script emitted errors for ~400
         files.
      
      2. Each error was manually checked.  Some didn't need the inclusion,
         some needed manual addition while adding it to implementation .h or
         embedding .c file was more appropriate for others.  This step added
         inclusions to around 150 files.
      
      3. The script was run again and the output was compared to the edits
         from #2 to make sure no file was left behind.
      
      4. Several build tests were done and a couple of problems were fixed.
         e.g. lib/decompress_*.c used malloc/free() wrappers around slab
         APIs requiring slab.h to be added manually.
      
      5. The script was run on all .h files but without automatically
         editing them as sprinkling gfp.h and slab.h inclusions around .h
         files could easily lead to inclusion dependency hell.  Most gfp.h
         inclusion directives were ignored as stuff from gfp.h was usually
         wildly available and often used in preprocessor macros.  Each
         slab.h inclusion directive was examined and added manually as
         necessary.
      
      6. percpu.h was updated not to include slab.h.
      
      7. Build test were done on the following configurations and failures
         were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
         distributed build env didn't work with gcov compiles) and a few
         more options had to be turned off depending on archs to make things
         build (like ipr on powerpc/64 which failed due to missing writeq).
      
         * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
         * powerpc and powerpc64 SMP allmodconfig
         * sparc and sparc64 SMP allmodconfig
         * ia64 SMP allmodconfig
         * s390 SMP allmodconfig
         * alpha SMP allmodconfig
         * um on x86_64 SMP allmodconfig
      
      8. percpu.h modifications were reverted so that it could be applied as
         a separate patch and serve as bisection point.
      
      Given the fact that I had only a couple of failures from tests on step
      6, I'm fairly confident about the coverage of this conversion patch.
      If there is a breakage, it's likely to be something in one of the arch
      headers which should be easily discoverable easily on most builds of
      the specific arch.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Guess-its-ok-by: NChristoph Lameter <cl@linux-foundation.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
      5a0e3ad6
  3. 20 2月, 2010 2 次提交
  4. 10 12月, 2009 9 次提交
  5. 06 9月, 2009 3 次提交
  6. 23 6月, 2009 1 次提交
  7. 28 4月, 2009 6 次提交
  8. 09 4月, 2009 3 次提交
    • F
      RDMA/nes: Fix nes_nic_cm_xmit() error handling · 5962c2c8
      Faisal Latif 提交于
      We are getting crash or hung situation when we are running network
      cable pull tests during RDMA traffic.
      
      In schedule_nes_timer(), we return an error if nes_nic_cm_xmit()
      returns failure.  This is changed to success as skb is being put on
      the timer routines to be processed later.  In send_syn() case, we are
      indicating connect failure once from nes_connect() and the other when
      the rexmit retries expires.
      
      The other issue is skb->users which we are incrementing before calling
      nes_nic_cm_xmit() which calls dev_queue_xmit() but in case of failure
      we are decrementing the skb->users at the same time putting the skb on
      the rexmit path.  Even if dev_queue_xmit() fails, the skb->users is
      decremented already.  We are removing the decrement of skb->users in
      case of failure from both schedule_nes_timer() as well as from
      nes_cm_timer_tick().
      
      There is also extra check in nes_cm_timer_tick() for rexmit failure
      which does a break from the loop is removed.  This causes problem as
      the other nodes have their cm_node->ref_count incremented and are not
      processed.
      Signed-off-by: NFaisal Latif <faisal.latif@intel.com>
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      5962c2c8
    • F
      RDMA/nes: Fix error handling issues · 79fc3d74
      Faisal Latif 提交于
      Fix issues found by static code analysis:
      
      (1) Check if cm_node was successfully created for loopback connection.
      
      (2) schedule_nes_timer() does not free up allocated memory after
          encountering an error.  There is a WARN_ON() for this condition.
      
      (3) there is a cm_node->freed flag which is set but not used.
      Reported-by: NDan Carpenter <error27@gmail.com>
      Signed-off-by: NFaisal Latif <faisal.latif@intel.com>
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      79fc3d74
    • D
      RDMA/nes: Fix incorrect casts on 32-bit architectures · 7a5efb62
      Don Wood 提交于
      The were some incorrect casts to unsigned long that caused 64-bit values
      to be truncated on 32-bit architectures and made the driver pass invalid
      adresses and lengths to the hardware.  The problems were primarily seen
      with kernels with highmem configured but some could show up in
      non-highmem kernels, too.
      Signed-off-by: NDon Wood <donald.e.wood@intel.com>
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      7a5efb62
  9. 13 3月, 2009 1 次提交
    • F
      RDMA/nes: Don't allow userspace QPs to use STag zero · c12e56ef
      Faisal Latif 提交于
      STag zero is a special STag that allows consumers to access any bus
      address without registering memory.  The nes driver unfortunately
      allows STag zero to be used even with QPs created by unprivileged
      userspace consumers, which means that any process with direct verbs
      access to the nes device can read and write any memory accessible to
      the underlying PCI device (usually any memory in the system).  Such
      access is usually given for cluster software such as MPI to use, so
      this is a local privilege escalation bug on most systems running this
      driver.
      
      The driver was using STag zero to receive the last streaming mode
      data; to allow STag zero to be disabled for unprivileged QPs, the
      driver now registers a special MR for this data.
      
      Cc: <stable@kernel.org>
      Signed-off-by: NFaisal Latif <faisal.latif@intel.com>
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      c12e56ef
  10. 07 3月, 2009 3 次提交
    • F
      RDMA/nes: Handle MPA Reject message properly · 9d5ab133
      Faisal Latif 提交于
      While doing testing, there are failures as MPA Reject call is not
      handled.  To handle MPA Reject call, following changes are done:
      
      *Handle inbound/outbound MPA Reject response message.
      	When nes_reject() is called for pending MPA request reply,
      	send the MPA Reject message to its peer (active
      	side)cm_node. The peer cm_node (active side) will indicate
      	Reject message event for the pending Connect Request.
      
      *Handle MPA Reject response message for loopback connections and listener.
      	When MPA Request is rejected, check if it is a loopback
      	connection and if it is then it will send Reject message event
      	to its peer loopback node. Also when destroying listener,
      	check if the cm_nodes for that listener are loopback or not.
      
      *Add gracefull connection close with the MPA Reject response message.
      	Send gracefull close (FIN, FIN ACK..) to terminate the cm_nodes.
      
      *Some code re-org while making the above changes.
      	Removed recv_list and recv_list_lock from the cm_node
      	structure as there can be only one receive close entry on the
      	timer. Also implemented handle_recv_entry() as receive close
      	entry is processed from both nes_rem_ref_cm_node() as well as
      	nes_cm_timer_tick().
      Signed-off-by: NFaisal Latif <faisal.latif@intel.com>
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      9d5ab133
    • C
      RDMA/nes: Fix tmp_addr compilation warning · 7b14ab0b
      Chien Tung 提交于
      In find_node(), tmp_addr causes an "unused variable" warning when
      INFINIBAND_NES_DEBUG is not defined.  It's only used in a nes_debug()
      and the print does not make sense.  So take out the whole thing.
      Reported-by: NManish Katiyar <mkatiyar@gmail.com>
      Signed-off-by: NChien Tung <chien.tin.tung@intel.com>
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      7b14ab0b
    • C
      RDMA/nes: Update copyright to new legal entity and year · cd6853d3
      Chien Tung 提交于
      Update copyright to the new legal entity, Intel-NE, Inc., an Intel
      company.  Update copyright for the new year.
      Signed-off-by: NChien Tung <chien.tin.tung@intel.com>
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      cd6853d3
  11. 11 1月, 2009 1 次提交
  12. 09 1月, 2009 1 次提交
  13. 25 12月, 2008 1 次提交
  14. 06 12月, 2008 7 次提交