]> git.baikalelectronics.ru Git - kernel.git/commit
RDMA/nes: Fix error handling issues
authorFaisal Latif <faisal.latif@intel.com>
Wed, 8 Apr 2009 21:22:20 +0000 (14:22 -0700)
committerRoland Dreier <rolandd@cisco.com>
Wed, 8 Apr 2009 21:22:20 +0000 (14:22 -0700)
commit477857ba2679c4cf35b2057828033269be81a40b
tree99c16570cd52c43d65bc9ca4e60f3c4e34d4ae7e
parenta5cd64d4f09910ebdc74c6804c6b182e1c50bc66
RDMA/nes: Fix error handling issues

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: Dan Carpenter <error27@gmail.com>
Signed-off-by: Faisal Latif <faisal.latif@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/hw/nes/nes_cm.c
drivers/infiniband/hw/nes/nes_cm.h