]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.14-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 28 Jan 2020 11:51:34 +0000 (12:51 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 28 Jan 2020 11:51:34 +0000 (12:51 +0100)
added patches:
md-avoid-namespace-collision-with-bitmap-api.patch

queue-4.14/md-avoid-namespace-collision-with-bitmap-api.patch [new file with mode: 0644]
queue-4.14/series

diff --git a/queue-4.14/md-avoid-namespace-collision-with-bitmap-api.patch b/queue-4.14/md-avoid-namespace-collision-with-bitmap-api.patch
new file mode 100644 (file)
index 0000000..341a811
--- /dev/null
@@ -0,0 +1,112 @@
+From foo@baz Tue 28 Jan 2020 12:49:12 PM CET
+Date: Tue, 28 Jan 2020 12:49:12 +0100
+To: Greg KH <gregkh@linuxfoundation.org>
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Subject: md: Avoid namespace collision with bitmap API
+
+From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
+
+commit e64e4018d572710c44f42c923d4ac059f0a23320 upstream.
+
+bitmap API (include/linux/bitmap.h) has 'bitmap' prefix for its methods.
+
+On the other hand MD bitmap API is special case.
+Adding 'md' prefix to it to avoid name space collision.
+
+No functional changes intended.
+
+Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
+Acked-by: Shaohua Li <shli@kernel.org>
+Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
+[only take the bitmap_free change for stable - gregkh]
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/md/bitmap.c     |   10 +++++-----
+ drivers/md/bitmap.h     |    2 +-
+ drivers/md/md-cluster.c |    6 +++---
+ 3 files changed, 9 insertions(+), 9 deletions(-)
+
+--- a/drivers/md/bitmap.c
++++ b/drivers/md/bitmap.c
+@@ -1729,7 +1729,7 @@ void bitmap_flush(struct mddev *mddev)
+ /*
+  * free memory that was allocated
+  */
+-void bitmap_free(struct bitmap *bitmap)
++void md_bitmap_free(struct bitmap *bitmap)
+ {
+       unsigned long k, pages;
+       struct bitmap_page *bp;
+@@ -1763,7 +1763,7 @@ void bitmap_free(struct bitmap *bitmap)
+       kfree(bp);
+       kfree(bitmap);
+ }
+-EXPORT_SYMBOL(bitmap_free);
++EXPORT_SYMBOL(md_bitmap_free);
+ void bitmap_wait_behind_writes(struct mddev *mddev)
+ {
+@@ -1796,7 +1796,7 @@ void bitmap_destroy(struct mddev *mddev)
+       if (mddev->thread)
+               mddev->thread->timeout = MAX_SCHEDULE_TIMEOUT;
+-      bitmap_free(bitmap);
++      md_bitmap_free(bitmap);
+ }
+ /*
+@@ -1887,7 +1887,7 @@ struct bitmap *bitmap_create(struct mdde
+       return bitmap;
+  error:
+-      bitmap_free(bitmap);
++      md_bitmap_free(bitmap);
+       return ERR_PTR(err);
+ }
+@@ -1958,7 +1958,7 @@ struct bitmap *get_bitmap_from_slot(stru
+       rv = bitmap_init_from_disk(bitmap, 0);
+       if (rv) {
+-              bitmap_free(bitmap);
++              md_bitmap_free(bitmap);
+               return ERR_PTR(rv);
+       }
+--- a/drivers/md/bitmap.h
++++ b/drivers/md/bitmap.h
+@@ -271,7 +271,7 @@ int bitmap_resize(struct bitmap *bitmap,
+ struct bitmap *get_bitmap_from_slot(struct mddev *mddev, int slot);
+ int bitmap_copy_from_slot(struct mddev *mddev, int slot,
+                               sector_t *lo, sector_t *hi, bool clear_bits);
+-void bitmap_free(struct bitmap *bitmap);
++void md_bitmap_free(struct bitmap *bitmap);
+ void bitmap_wait_behind_writes(struct mddev *mddev);
+ #endif
+--- a/drivers/md/md-cluster.c
++++ b/drivers/md/md-cluster.c
+@@ -1128,7 +1128,7 @@ int cluster_check_sync_size(struct mddev
+               bm_lockres = lockres_init(mddev, str, NULL, 1);
+               if (!bm_lockres) {
+                       pr_err("md-cluster: Cannot initialize %s\n", str);
+-                      bitmap_free(bitmap);
++                      md_bitmap_free(bitmap);
+                       return -1;
+               }
+               bm_lockres->flags |= DLM_LKF_NOQUEUE;
+@@ -1142,11 +1142,11 @@ int cluster_check_sync_size(struct mddev
+                       sync_size = sb->sync_size;
+               else if (sync_size != sb->sync_size) {
+                       kunmap_atomic(sb);
+-                      bitmap_free(bitmap);
++                      md_bitmap_free(bitmap);
+                       return -1;
+               }
+               kunmap_atomic(sb);
+-              bitmap_free(bitmap);
++              md_bitmap_free(bitmap);
+       }
+       return (my_sync_size == sync_size) ? 0 : -1;
index 5ef135f8381825d3ca16bfdcc363c9eef9cc571c..f51874e9868639187f2f152f7ecfa83c178f925f 100644 (file)
@@ -36,6 +36,7 @@ coresight-tmc-etf-do-not-call-smp_processor_id-from-preemptible.patch
 libertas-fix-two-buffer-overflows-at-parsing-bss-descriptor.patch
 media-v4l2-ioctl.c-zero-reserved-fields-for-s-try_fmt.patch
 scsi-iscsi-avoid-potential-deadlock-in-iscsi_if_rx-func.patch
+md-avoid-namespace-collision-with-bitmap-api.patch
 bitmap-add-bitmap_alloc-bitmap_zalloc-and-bitmap_free.patch
 netfilter-ipset-use-bitmap-infrastructure-completely.patch
 net-x25-fix-nonblocking-connect.patch