Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Thumshirn <jthumshirn@suse.de>2018-10-15 10:16:55 +0200
committerJohannes Thumshirn <jthumshirn@suse.de>2018-10-15 10:17:10 +0200
commit8a987ff185fdf21cdefa334248c20d416a387f95 (patch)
tree636259bd5ea92a91a1b6b5c71fbde599733b27f7
parent180fec1d5fb0787bd498232990d489746550da2f (diff)
net/smc: retain old name for diag_mode field (bsc#1106287,
LTC#170892).
-rw-r--r--patches.drivers/net-smc-retain-old-name-for-diag_mode-field.patch38
-rw-r--r--series.conf1
2 files changed, 39 insertions, 0 deletions
diff --git a/patches.drivers/net-smc-retain-old-name-for-diag_mode-field.patch b/patches.drivers/net-smc-retain-old-name-for-diag_mode-field.patch
new file mode 100644
index 0000000000..9e2331dc34
--- /dev/null
+++ b/patches.drivers/net-smc-retain-old-name-for-diag_mode-field.patch
@@ -0,0 +1,38 @@
+From: Eugene Syromiatnikov <esyr@redhat.com>
+Date: Sun, 7 Oct 2018 16:57:37 +0200
+Subject: net/smc: retain old name for diag_mode field
+Patch-mainline: v4.19-rc8
+Git-commit: d4f0006a08f52b5320f038780286ef312535fc64
+References: bsc#1106287, LTC#170892
+
+Commit c601171d7a60 ("net/smc: provide smc mode in smc_diag.c") changed
+the name of diag_fallback field of struct smc_diag_msg structure
+to diag_mode. However, this structure is a part of UAPI, and this change
+breaks user space applications that use it ([1], for example). Since
+the new name is more suitable, convert the field to a union that provides
+access to the data via both the new and the old name.
+
+[1] https://gitlab.com/strace/strace/blob/v4.24/netlink_smc_diag.c#L165
+
+Fixes: c601171d7a60 ("net/smc: provide smc mode in smc_diag.c")
+Signed-off-by: Eugene Syromiatnikov <esyr@redhat.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Acked-by: Johannes Thumshirn <jthumshirn@suse.de>
+---
+ include/uapi/linux/smc_diag.h | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+--- a/include/uapi/linux/smc_diag.h
++++ b/include/uapi/linux/smc_diag.h
+@@ -19,7 +19,10 @@ struct smc_diag_req {
+ struct smc_diag_msg {
+ __u8 diag_family;
+ __u8 diag_state;
+- __u8 diag_mode;
++ union {
++ __u8 diag_mode;
++ __u8 diag_fallback; /* the old name of the field */
++ };
+ __u8 diag_shutdown;
+ struct inet_diag_sockid id;
+
diff --git a/series.conf b/series.conf
index cc0a1bc18c..3dd2da5b4a 100644
--- a/series.conf
+++ b/series.conf
@@ -18016,6 +18016,7 @@
patches.drivers/scsi-qedi-initialize-the-stats-mutex-lock
patches.drivers/usb-cdc_acm-Do-not-leak-URB-buffers.patch
patches.drivers/net-smc-use-__aligned_u64-for-64-bit-smc_diag-fields.patch
+ patches.drivers/net-smc-retain-old-name-for-diag_mode-field.patch
# davem/net
patches.fixes/udp-Unbreak-modules-that-rely-on-external-__skb_recv.patch