]> git.baikalelectronics.ru Git - kernel.git/commit
net/smc: fix ethernet interface refcounting
authorUrsula Braun <ubraun@linux.ibm.com>
Wed, 6 Nov 2019 09:49:57 +0000 (10:49 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 7 Nov 2019 01:44:32 +0000 (17:44 -0800)
commit573dfdf401389dfede5437aad7746a5b80a0cf1d
tree2f631ea75800af5538977e20b3d0f944d865561f
parent1cd0e53a2ea16d53afd8d5b221d49e1322e44f42
net/smc: fix ethernet interface refcounting

If a pnet table entry is to be added mentioning a valid ethernet
interface, but an invalid infiniband or ISM device, the dev_put()
operation for the ethernet interface is called twice, resulting
in a negative refcount for the ethernet interface, which disables
removal of such a network interface.

This patch removes one of the dev_put() calls.

Fixes: 55e6e986981e ("net/smc: rework pnet table")
Signed-off-by: Ursula Braun <ubraun@linux.ibm.com>
Signed-off-by: Karsten Graul <kgraul@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/smc/smc_pnet.c