Home Home > GIT Browse > SLE12-SP3-AZURE
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Kirjanov <dkirjanov@suse.com>2019-02-18 11:45:55 +0100
committerDenis Kirjanov <dkirjanov@suse.com>2019-02-18 11:45:55 +0100
commit49551f20daaffd4586d4ef257475780c93a3c98a (patch)
tree826562fdc21ed0aa64dc75e6c304e6501d8e67c8
parentcfbcea74765d32e1a626094b41d87ac9e88680e0 (diff)
IB/rxe: Fix incorrect cache cleanup in error flow (FATE#322149).
-rw-r--r--patches.drivers/IB-rxe-Fix-incorrect-cache-cleanup-in-error-flow.patch68
-rw-r--r--series.conf1
2 files changed, 69 insertions, 0 deletions
diff --git a/patches.drivers/IB-rxe-Fix-incorrect-cache-cleanup-in-error-flow.patch b/patches.drivers/IB-rxe-Fix-incorrect-cache-cleanup-in-error-flow.patch
new file mode 100644
index 0000000000..5c63fb895e
--- /dev/null
+++ b/patches.drivers/IB-rxe-Fix-incorrect-cache-cleanup-in-error-flow.patch
@@ -0,0 +1,68 @@
+From: Yuval Shaia <yuval.shaia@oracle.com>
+Date: Sun, 9 Dec 2018 15:53:49 +0200
+Subject: IB/rxe: Fix incorrect cache cleanup in error flow
+Patch-mainline: v5.0-rc1
+Git-commit: 6db21d8986e14e2e86573a3b055b05296188bd2c
+References: FATE#322149
+
+Array iterator stays at the same slot, fix it.
+
+Fixes: 8700e3e7c485 ("Soft RoCE driver")
+Signed-off-by: Yuval Shaia <yuval.shaia@oracle.com>
+Reviewed-by: Bart Van Assche <bvanassche@acm.org>
+Reviewed-by: Zhu Yanjun <yanjun.zhu@oracle.com>
+Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
+Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
+Acked-by: Denis Kirjanov <dkirjanov@suse.com>
+---
+ drivers/infiniband/sw/rxe/rxe_pool.c | 26 ++++++++++++++------------
+ 1 file changed, 14 insertions(+), 12 deletions(-)
+
+--- a/drivers/infiniband/sw/rxe/rxe_pool.c
++++ b/drivers/infiniband/sw/rxe/rxe_pool.c
+@@ -112,6 +112,18 @@ static inline struct kmem_cache *pool_ca
+ return rxe_type_info[pool->type].cache;
+ }
+
++static void rxe_cache_clean(size_t cnt)
++{
++ int i;
++ struct rxe_type_info *type;
++
++ for (i = 0; i < cnt; i++) {
++ type = &rxe_type_info[i];
++ kmem_cache_destroy(type->cache);
++ type->cache = NULL;
++ }
++}
++
+ int rxe_cache_init(void)
+ {
+ int err;
+@@ -136,24 +148,14 @@ int rxe_cache_init(void)
+ return 0;
+
+ err1:
+- while (--i >= 0) {
+- kmem_cache_destroy(type->cache);
+- type->cache = NULL;
+- }
++ rxe_cache_clean(i);
+
+ return err;
+ }
+
+ void rxe_cache_exit(void)
+ {
+- int i;
+- struct rxe_type_info *type;
+-
+- for (i = 0; i < RXE_NUM_TYPES; i++) {
+- type = &rxe_type_info[i];
+- kmem_cache_destroy(type->cache);
+- type->cache = NULL;
+- }
++ rxe_cache_clean(RXE_NUM_TYPES);
+ }
+
+ static int rxe_pool_init_index(struct rxe_pool *pool, u32 max, u32 min)
diff --git a/series.conf b/series.conf
index 94a12893fe..b996a4ce8f 100644
--- a/series.conf
+++ b/series.conf
@@ -24225,6 +24225,7 @@
patches.fixes/xfs-Align-compat-attrlist_by_handle-with-native-impl.patch
patches.fixes/scsi-target-add-emulate_pr-backstore-attr-to-toggle-.patch
patches.fixes/scsi-target-drop-unused-pi_prot_format-attribute-sto.patch
+ patches.drivers/IB-rxe-Fix-incorrect-cache-cleanup-in-error-flow.patch
patches.suse/dm-do-not-allow-readahead-to-limit-IO-size.patch
patches.fixes/0001-mm-print-more-information-about-mapping-in-__dump_pa.patch
patches.fixes/0002-mm-lower-the-printk-loglevel-for-__dump_page-message.patch