OSDN Git Service

IB/core: Unregister notifier before freeing MAD security
authorDaniel Jurgens <danielj@mellanox.com>
Sat, 2 Feb 2019 09:09:42 +0000 (11:09 +0200)
committerJason Gunthorpe <jgg@mellanox.com>
Fri, 8 Feb 2019 23:24:44 +0000 (16:24 -0700)
commitd60667fc398ed34b3c7456b020481c55c760e503
treef8c8fec5b7dd771bd13775352fbaa0d6749c6188
parent0c236606490b5b356ac3bb885b6417ce09bce63f
IB/core: Unregister notifier before freeing MAD security

If the notifier runs after the security context is freed an access of
freed memory can occur.

Fixes: 47a2b338fe63 ("IB/core: Enforce security on management datagrams")
Signed-off-by: Daniel Jurgens <danielj@mellanox.com>
Reviewed-by: Parav Pandit <parav@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/core/security.c