IB/cma: Potential NULL dereference in cma_id_from_event
authorHaggai Eran <haggaie@mellanox.com>
Mon, 21 Sep 2015 13:02:02 +0000 (16:02 +0300)
committerDoug Ledford <dledford@redhat.com>
Tue, 20 Oct 2015 17:13:42 +0000 (13:13 -0400)
commitb3b51f9f6f5d91cd16afaed0c22df2c56ed5f92e
treec1934c46d632a5b5b27fae8525c054770ea552f5
parent3909642034ffd7a8906ff3f2b2a71455bf39e7f6
IB/cma: Potential NULL dereference in cma_id_from_event

If the lookup of a listening ID failed for an AF_IB request, the code
would try to call dev_put() on a NULL net_dev.

Fixes: be688195bd08 ("IB/cma: Fix net_dev reference leak with failed
requests")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Haggai Eran <haggaie@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/core/cma.c