sock_diag: fix autoloading of the raw_diag module
authorAndrei Vagin <avagin@gmail.com>
Mon, 5 Nov 2018 06:37:15 +0000 (22:37 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 1 Dec 2019 08:17:18 +0000 (09:17 +0100)
commit811c8141d663e399f9413eba23eb046c98b16665
treead9bed8029bb8b41f4b0843d04b5030b6261cf00
parent3c69a033b416cdebf455787f51750e3ab0c12718
sock_diag: fix autoloading of the raw_diag module

[ Upstream commit c34c1287778b080ed692c0a46a8e345206cc29e6 ]

IPPROTO_RAW isn't registred as an inet protocol, so
inet_protos[protocol] is always NULL for it.

Cc: Cyrill Gorcunov <gorcunov@gmail.com>
Cc: Xin Long <lucien.xin@gmail.com>
Fixes: bf2ae2e4bf93 ("sock_diag: request _diag module only when the family or proto has been registered")
Signed-off-by: Andrei Vagin <avagin@gmail.com>
Reviewed-by: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/core/sock.c