]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commit
net/tls: don't ignore netdev notifications if no TLS features
authorJakub Kicinski <jakub.kicinski@netronome.com>
Wed, 22 May 2019 02:02:02 +0000 (19:02 -0700)
committerStefan Bader <stefan.bader@canonical.com>
Tue, 13 Aug 2019 12:11:36 +0000 (14:11 +0200)
commit5246c439bd52f91e0d882e6917fde9f4d1ad358f
tree757e885e889bbbed14e22eae1acbd5cf8673301e
parentb668d0662a46900ae30248f84e54800dd6c2adc3
net/tls: don't ignore netdev notifications if no TLS features

BugLink: https://bugs.launchpad.net/bugs/1837518
[ Upstream commit c3f4a6c39cf269a40d45f813c05fa830318ad875 ]

On device surprise removal path (the notifier) we can't
bail just because the features are disabled.  They may
have been enabled during the lifetime of the device.
This bug leads to leaking netdev references and
use-after-frees if there are active connections while
device features are cleared.

Fixes: e8f69799810c ("net/tls: Add generic NIC offload infrastructure")
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Dirk van der Merwe <dirk.vandermerwe@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
net/tls/tls_device.c