]> git.proxmox.com Git - mirror_ubuntu-eoan-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)
committerStefan Bader <stefan.bader@canonical.com>
Wed, 4 Dec 2019 09:29:26 +0000 (10:29 +0100)
commit11630b2fd2b7ee9b786185a96b511df64505a2c3
treebdad7218b74a856117fb55c56a19b418225a42dc
parente3b314f9757f1458354398fd98fb969fcd6a643c
net/smc: fix ethernet interface refcounting

BugLink: https://bugs.launchpad.net/bugs/1852338
[ Upstream commit 98f3375505b8d6517bd6710bc6d4f6289eeb30aa ]

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: 890a2cb4a966 ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Connor Kuehl <connor.kuehl@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
net/smc/smc_pnet.c