infiniband: call ipv6 route lookup via the stub interface
authorPaolo Abeni <pabeni@redhat.com>
Fri, 28 Apr 2017 09:20:01 +0000 (11:20 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 May 2017 12:30:07 +0000 (14:30 +0200)
commitc04397351fe577a4b4d046524118c38d87002e81
treef5d11ca8ea9f0a8eacbcf0ff90886f2d1deba530
parent63450e38efe3ce80e563827d5b3f59b3f7a12ecf
infiniband: call ipv6 route lookup via the stub interface

commit eea40b8f624f25cbc02d55f2d93203f60cee9341 upstream.

The infiniband address handle can be triggered to resolve an ipv6
address in response to MAD packets, regardless of the ipv6
module being disabled via the kernel command line argument.

That will cause a call into the ipv6 routing code, which is not
initialized, and a conseguent oops.

This commit addresses the above issue replacing the direct lookup
call with an indirect one via the ipv6 stub, which is properly
initialized according to the ipv6 status (e.g. if ipv6 is
disabled, the routing lookup fails gracefully)

Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/infiniband/core/addr.c