[merged] slab-make-kmalloc_size-return-unsigned-int.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: slab: make kmalloc_size() return "unsigned int"
has been removed from the -mm tree.  Its filename was
     slab-make-kmalloc_size-return-unsigned-int.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Alexey Dobriyan <adobriyan@xxxxxxxxx>
Subject: slab: make kmalloc_size() return "unsigned int"

kmalloc_size() derives size of kmalloc cache from internal index,
which can't be negative.

Propagate unsignedness a bit.

Link: http://lkml.kernel.org/r/20180305200730.15812-3-adobriyan@xxxxxxxxx
Signed-off-by: Alexey Dobriyan <adobriyan@xxxxxxxxx>
Acked-by: Christoph Lameter <cl@xxxxxxxxx>
Cc: Pekka Enberg <penberg@xxxxxxxxxx>
Cc: David Rientjes <rientjes@xxxxxxxxxx>
Cc: Joonsoo Kim <iamjoonsoo.kim@xxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 include/linux/slab.h |    4 ++--
 mm/slab_common.c     |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff -puN include/linux/slab.h~slab-make-kmalloc_size-return-unsigned-int include/linux/slab.h
--- a/include/linux/slab.h~slab-make-kmalloc_size-return-unsigned-int
+++ a/include/linux/slab.h
@@ -522,11 +522,11 @@ static __always_inline void *kmalloc(siz
  * return size or 0 if a kmalloc cache for that
  * size does not exist
  */
-static __always_inline int kmalloc_size(int n)
+static __always_inline unsigned int kmalloc_size(unsigned int n)
 {
 #ifndef CONFIG_SLOB
 	if (n > 2)
-		return 1 << n;
+		return 1U << n;
 
 	if (n == 1 && KMALLOC_MIN_SIZE <= 32)
 		return 96;
diff -puN mm/slab_common.c~slab-make-kmalloc_size-return-unsigned-int mm/slab_common.c
--- a/mm/slab_common.c~slab-make-kmalloc_size-return-unsigned-int
+++ a/mm/slab_common.c
@@ -1138,9 +1138,9 @@ void __init create_kmalloc_caches(slab_f
 		struct kmem_cache *s = kmalloc_caches[i];
 
 		if (s) {
-			int size = kmalloc_size(i);
+			unsigned int size = kmalloc_size(i);
 			char *n = kasprintf(GFP_NOWAIT,
-				 "dma-kmalloc-%d", size);
+				 "dma-kmalloc-%u", size);
 
 			BUG_ON(!n);
 			kmalloc_dma_caches[i] = create_kmalloc_cache(n,
_

Patches currently in -mm which might be from adobriyan@xxxxxxxxx are

proc-do-less-stuff-under-pde_unload_lock.patch
proc-move-proc-sysvipc-creation-to-where-it-belongs.patch
proc-faster-open-close-of-files-without-release-hook.patch
proc-randomize-struct-pde_opener.patch
proc-move-struct-pde_opener-to-kmem-cache.patch
proc-account-struct-pde_opener.patch
proc-check-permissions-earlier-for-proc-wchan.patch
proc-use-set_puts-at-proc-wchan.patch
proc-test-proc-self-wchan.patch
proc-test-proc-self-syscall.patch
proc-move-struct-proc_dir_entry-into-kmem-cache.patch
proc-fix-proc-map_files-lookup-some-more.patch
proc-register-filesystem-last.patch
proc-faster-proc-cmdline.patch
proc-do-mmput-asap-for-proc-map_files.patch
proc-revalidate-misc-dentries.patch
proc-test-last-field-of-proc-loadavg.patch
proc-reject-and-as-filenames.patch
proc-switch-struct-proc_dir_entry-count-to-refcount.patch
proc-shotgun-test-read-readdir-readlink-a-little-write.patch
proc-shotgun-test-read-readdir-readlink-a-little-write-fix.patch
proc-shotgun-test-read-readdir-readlink-a-little-write-fix-2.patch
proc-use-slower-rb_first.patch
proc-test-proc-uptime.patch
uts-create-struct-uts_namespace-from-kmem_cache.patch
seq_file-allocate-seq_file-from-kmem_cache.patch
seq_file-account-everything.patch
seq_file-delete-small-value-optimization.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux