Home Home > GIT Browse > SLE12-SP4
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Abraham <tabraham@suse.com>2019-10-16 18:32:50 -0400
committerThomas Abraham <tabraham@suse.com>2019-10-16 18:32:50 -0400
commit10e0006f65ac61145d67875d1bbd2fbd6ee7ad96 (patch)
tree14cf1327e66ef59b2a53b81b76c2aa8914a4ceb5
parente0bdf125ecf5a75853db1bcf9ae4200412ea34df (diff)
sock_diag: fix autoloading of the raw_diag module (bsc#1152791).
-rw-r--r--patches.suse/sock_diag-fix-autoloading-of-the-raw_diag-module.patch37
-rw-r--r--series.conf1
2 files changed, 38 insertions, 0 deletions
diff --git a/patches.suse/sock_diag-fix-autoloading-of-the-raw_diag-module.patch b/patches.suse/sock_diag-fix-autoloading-of-the-raw_diag-module.patch
new file mode 100644
index 0000000000..c2c51cd6cd
--- /dev/null
+++ b/patches.suse/sock_diag-fix-autoloading-of-the-raw_diag-module.patch
@@ -0,0 +1,37 @@
+From c34c1287778b080ed692c0a46a8e345206cc29e6 Mon Sep 17 00:00:00 2001
+From: Andrei Vagin <avagin@gmail.com>
+Date: Sun, 4 Nov 2018 22:37:15 -0800
+Subject: [PATCH] sock_diag: fix autoloading of the raw_diag module
+References: bsc#1152791
+Git-commit: c34c1287778b080ed692c0a46a8e345206cc29e6
+Patch-mainline: v4.20-rc2
+
+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: Thomas Abraham <tabraham@suse.com>
+---
+ net/core/sock.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/net/core/sock.c b/net/core/sock.c
+index 6fcc4bc07d19..080a880a1761 100644
+--- a/net/core/sock.c
++++ b/net/core/sock.c
+@@ -3279,6 +3279,7 @@ int sock_load_diag_module(int family, int protocol)
+
+ #ifdef CONFIG_INET
+ if (family == AF_INET &&
++ protocol != IPPROTO_RAW &&
+ !rcu_access_pointer(inet_protos[protocol]))
+ return -ENOENT;
+ #endif
+--
+2.16.4
+
diff --git a/series.conf b/series.conf
index dfaadd5b13..1617ab2537 100644
--- a/series.conf
+++ b/series.conf
@@ -20602,6 +20602,7 @@
patches.suse/mlxsw-spectrum-Fix-IP2ME-CPU-policer-configuration.patch
patches.suse/sctp-fix-strchange_flags-name-for-Stream-Change-Even.patch
patches.suse/bonding-802.3ad-fix-link_failure_count-tracking.patch
+ patches.suse/sock_diag-fix-autoloading-of-the-raw_diag-module.patch
patches.suse/netfilter-conntrack-fix-calculation-of-next-bucket-n.patch
patches.suse/HID-hiddev-fix-potential-Spectre-v1.patch
patches.suse/hwmon-core-Fix-double-free-in-__hwmon_device_registe.patch