Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'slab/for-6.19/freelist_aba_t_cleanups' into slab/for-next

Merge series "slab: cmpxchg cleanups enabled by -fms-extensions"

From the cover letter [1]:

After learning about -fms-extensions being enabled for 6.19, I realized
there is some cleanup potential in slub code by extending the definition
and usage of freelist_aba_t, as it can now become an unnamed member of
struct slab. This series performs the cleanup, with no functional
changes intended. Additionally we turn freelist_aba_t to struct
freelist_counters as it doesn't meet any criteria for being a typedef,
per Documentation/process/coding-style.rst

Based on the tag kbuild-ms-extensions-6.19 from
git://git.kernel.org/pub/scm/linux/kernel/git/kbuild/linuxV

Link: https://lore.kernel.org/all/20251107-slab-fms-cleanup-v1-0-650b1491ac9e@suse.cz/#t [1]

+122 -129
+3
Makefile
··· 1061 1061 # perform bounds checking. 1062 1062 KBUILD_CFLAGS += $(call cc-option, -fstrict-flex-arrays=3) 1063 1063 1064 + # Allow including a tagged struct or union anonymously in another struct/union. 1065 + KBUILD_CFLAGS += -fms-extensions 1066 + 1064 1067 # disable invalid "can't wrap" optimizations for signed / pointers 1065 1068 KBUILD_CFLAGS += -fno-strict-overflow 1066 1069
+2 -1
arch/arm64/kernel/vdso32/Makefile
··· 63 63 $(filter -Werror,$(KBUILD_CPPFLAGS)) \ 64 64 -Werror-implicit-function-declaration \ 65 65 -Wno-format-security \ 66 - -std=gnu11 66 + -std=gnu11 -fms-extensions 67 67 VDSO_CFLAGS += -O2 68 68 # Some useful compiler-dependent flags from top-level Makefile 69 69 VDSO_CFLAGS += $(call cc32-option,-Wno-pointer-sign) ··· 71 71 VDSO_CFLAGS += $(call cc32-option,-Werror=strict-prototypes) 72 72 VDSO_CFLAGS += -Werror=date-time 73 73 VDSO_CFLAGS += $(call cc32-option,-Werror=incompatible-pointer-types) 74 + VDSO_CFLAGS += $(if $(CONFIG_CC_IS_CLANG),-Wno-microsoft-anon-tag) 74 75 75 76 # Compile as THUMB2 or ARM. Unwinding via frame-pointers in THUMB2 is 76 77 # unreliable.
+1 -1
arch/loongarch/vdso/Makefile
··· 19 19 cflags-vdso := $(ccflags-vdso) \ 20 20 -isystem $(shell $(CC) -print-file-name=include) \ 21 21 $(filter -W%,$(filter-out -Wa$(comma)%,$(KBUILD_CFLAGS))) \ 22 - -std=gnu11 -O2 -g -fno-strict-aliasing -fno-common -fno-builtin \ 22 + -std=gnu11 -fms-extensions -O2 -g -fno-strict-aliasing -fno-common -fno-builtin \ 23 23 -fno-stack-protector -fno-jump-tables -DDISABLE_BRANCH_PROFILING \ 24 24 $(call cc-option, -fno-asynchronous-unwind-tables) \ 25 25 $(call cc-option, -fno-stack-protector)
+1 -1
arch/parisc/boot/compressed/Makefile
··· 18 18 ifndef CONFIG_64BIT 19 19 KBUILD_CFLAGS += -mfast-indirect-calls 20 20 endif 21 - KBUILD_CFLAGS += -std=gnu11 21 + KBUILD_CFLAGS += -std=gnu11 -fms-extensions 22 22 23 23 LDFLAGS_vmlinux := -X -e startup --as-needed -T 24 24 $(obj)/vmlinux: $(obj)/vmlinux.lds $(addprefix $(obj)/, $(OBJECTS)) $(LIBGCC) FORCE
+2 -1
arch/powerpc/boot/Makefile
··· 70 70 BOOTCPPFLAGS += -isystem $(shell $(BOOTCC) -print-file-name=include) 71 71 72 72 BOOTCFLAGS := $(BOOTTARGETFLAGS) \ 73 - -std=gnu11 \ 73 + -std=gnu11 -fms-extensions \ 74 74 -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \ 75 75 -fno-strict-aliasing -O2 \ 76 76 -msoft-float -mno-altivec -mno-vsx \ ··· 86 86 87 87 ifdef CONFIG_CC_IS_CLANG 88 88 BOOTCFLAGS += $(CLANG_FLAGS) 89 + BOOTCFLAGS += -Wno-microsoft-anon-tag 89 90 BOOTAFLAGS += $(CLANG_FLAGS) 90 91 endif 91 92
+2 -1
arch/s390/Makefile
··· 22 22 ifndef CONFIG_AS_IS_LLVM 23 23 KBUILD_AFLAGS_DECOMPRESSOR += $(if $(CONFIG_DEBUG_INFO),$(aflags_dwarf)) 24 24 endif 25 - KBUILD_CFLAGS_DECOMPRESSOR := $(CLANG_FLAGS) -m64 -O2 -mpacked-stack -std=gnu11 25 + KBUILD_CFLAGS_DECOMPRESSOR := $(CLANG_FLAGS) -m64 -O2 -mpacked-stack -std=gnu11 -fms-extensions 26 26 KBUILD_CFLAGS_DECOMPRESSOR += -DDISABLE_BRANCH_PROFILING -D__NO_FORTIFY 27 27 KBUILD_CFLAGS_DECOMPRESSOR += -D__DECOMPRESSOR 28 28 KBUILD_CFLAGS_DECOMPRESSOR += -Wno-pointer-sign ··· 35 35 KBUILD_CFLAGS_DECOMPRESSOR += $(if $(CONFIG_DEBUG_INFO),-g) 36 36 KBUILD_CFLAGS_DECOMPRESSOR += $(if $(CONFIG_DEBUG_INFO_DWARF4), $(call cc-option, -gdwarf-4,)) 37 37 KBUILD_CFLAGS_DECOMPRESSOR += $(if $(CONFIG_CC_NO_ARRAY_BOUNDS),-Wno-array-bounds) 38 + KBUILD_CFLAGS_DECOMPRESSOR += $(if $(CONFIG_CC_IS_CLANG),-Wno-microsoft-anon-tag) 38 39 39 40 UTS_MACHINE := s390x 40 41 STACK_SIZE := $(if $(CONFIG_KASAN),65536,$(if $(CONFIG_KMSAN),65536,16384))
+2 -1
arch/s390/purgatory/Makefile
··· 13 13 $(obj)/mem.o: $(srctree)/arch/s390/lib/mem.S FORCE 14 14 $(call if_changed_rule,as_o_S) 15 15 16 - KBUILD_CFLAGS := -std=gnu11 -fno-strict-aliasing -Wall -Wstrict-prototypes 16 + KBUILD_CFLAGS := -std=gnu11 -fms-extensions -fno-strict-aliasing -Wall -Wstrict-prototypes 17 17 KBUILD_CFLAGS += -Wno-pointer-sign -Wno-sign-compare 18 18 KBUILD_CFLAGS += -fno-zero-initialized-in-bss -fno-builtin -ffreestanding 19 19 KBUILD_CFLAGS += -Os -m64 -msoft-float -fno-common ··· 21 21 KBUILD_CFLAGS += -DDISABLE_BRANCH_PROFILING 22 22 KBUILD_CFLAGS += -D__DISABLE_EXPORTS 23 23 KBUILD_CFLAGS += $(CLANG_FLAGS) 24 + KBUILD_CFLAGS += $(if $(CONFIG_CC_IS_CLANG),-Wno-microsoft-anon-tag) 24 25 KBUILD_CFLAGS += $(call cc-option,-fno-PIE) 25 26 KBUILD_AFLAGS := $(filter-out -DCC_USING_EXPOLINE,$(KBUILD_AFLAGS)) 26 27 KBUILD_AFLAGS += -D__DISABLE_EXPORTS
+3 -1
arch/x86/Makefile
··· 48 48 49 49 # How to compile the 16-bit code. Note we always compile for -march=i386; 50 50 # that way we can complain to the user if the CPU is insufficient. 51 - REALMODE_CFLAGS := -std=gnu11 -m16 -g -Os -DDISABLE_BRANCH_PROFILING -D__DISABLE_EXPORTS \ 51 + REALMODE_CFLAGS := -std=gnu11 -fms-extensions -m16 -g -Os \ 52 + -DDISABLE_BRANCH_PROFILING -D__DISABLE_EXPORTS \ 52 53 -Wall -Wstrict-prototypes -march=i386 -mregparm=3 \ 53 54 -fno-strict-aliasing -fomit-frame-pointer -fno-pic \ 54 55 -mno-mmx -mno-sse $(call cc-option,-fcf-protection=none) ··· 61 60 REALMODE_CFLAGS += $(CLANG_FLAGS) 62 61 ifdef CONFIG_CC_IS_CLANG 63 62 REALMODE_CFLAGS += -Wno-gnu 63 + REALMODE_CFLAGS += -Wno-microsoft-anon-tag 64 64 endif 65 65 export REALMODE_CFLAGS 66 66
+5 -2
arch/x86/boot/compressed/Makefile
··· 25 25 # avoid errors with '-march=i386', and future flags may depend on the target to 26 26 # be valid. 27 27 KBUILD_CFLAGS := -m$(BITS) -O2 $(CLANG_FLAGS) 28 - KBUILD_CFLAGS += -std=gnu11 28 + KBUILD_CFLAGS += -std=gnu11 -fms-extensions 29 29 KBUILD_CFLAGS += -fno-strict-aliasing -fPIE 30 30 KBUILD_CFLAGS += -Wundef 31 31 KBUILD_CFLAGS += -DDISABLE_BRANCH_PROFILING ··· 36 36 KBUILD_CFLAGS += -ffreestanding -fshort-wchar 37 37 KBUILD_CFLAGS += -fno-stack-protector 38 38 KBUILD_CFLAGS += $(call cc-disable-warning, address-of-packed-member) 39 - KBUILD_CFLAGS += $(call cc-disable-warning, gnu) 39 + ifdef CONFIG_CC_IS_CLANG 40 + KBUILD_CFLAGS += -Wno-gnu 41 + KBUILD_CFLAGS += -Wno-microsoft-anon-tag 42 + endif 40 43 KBUILD_CFLAGS += -Wno-pointer-sign 41 44 KBUILD_CFLAGS += -fno-asynchronous-unwind-tables 42 45 KBUILD_CFLAGS += -D__DISABLE_EXPORTS
+2 -2
drivers/firmware/efi/libstub/Makefile
··· 11 11 12 12 cflags-$(CONFIG_X86_32) := -march=i386 13 13 cflags-$(CONFIG_X86_64) := -mcmodel=small 14 - cflags-$(CONFIG_X86) += -m$(BITS) -D__KERNEL__ -std=gnu11 \ 14 + cflags-$(CONFIG_X86) += -m$(BITS) -D__KERNEL__ -std=gnu11 -fms-extensions \ 15 15 -fPIC -fno-strict-aliasing -mno-red-zone \ 16 16 -mno-mmx -mno-sse -fshort-wchar \ 17 17 -Wno-pointer-sign \ 18 18 $(call cc-disable-warning, address-of-packed-member) \ 19 - $(call cc-disable-warning, gnu) \ 19 + $(if $(CONFIG_CC_IS_CLANG),-Wno-gnu -Wno-microsoft-anon-tag) \ 20 20 -fno-asynchronous-unwind-tables \ 21 21 $(CLANG_FLAGS) 22 22
+3 -3
fs/jfs/jfs_incore.h
··· 76 76 struct { 77 77 unchar _unused[16]; /* 16: */ 78 78 dxd_t _dxd; /* 16: */ 79 - /* _inline may overflow into _inline_ea when needed */ 79 + /* _inline_sym may overflow into _inline_ea when needed */ 80 80 /* _inline_ea may overlay the last part of 81 81 * file._xtroot if maxentry = XTROOTINITSLOT 82 82 */ 83 83 union { 84 84 struct { 85 85 /* 128: inline symlink */ 86 - unchar _inline[128]; 86 + unchar _inline_sym[128]; 87 87 /* 128: inline extended attr */ 88 88 unchar _inline_ea[128]; 89 89 }; ··· 101 101 #define i_imap u.file._imap 102 102 #define i_dirtable u.dir._table 103 103 #define i_dtroot u.dir._dtroot 104 - #define i_inline u.link._inline 104 + #define i_inline u.link._inline_sym 105 105 #define i_inline_ea u.link._inline_ea 106 106 #define i_inline_all u.link._inline_all 107 107
+24 -28
mm/slab.h
··· 40 40 * Freelist pointer and counter to cmpxchg together, avoids the typical ABA 41 41 * problems with cmpxchg of just a pointer. 42 42 */ 43 - typedef union { 44 - struct { 45 - void *freelist; 46 - unsigned long counter; 43 + struct freelist_counters { 44 + union { 45 + struct { 46 + void *freelist; 47 + union { 48 + unsigned long counters; 49 + struct { 50 + unsigned inuse:16; 51 + unsigned objects:15; 52 + /* 53 + * If slab debugging is enabled then the 54 + * frozen bit can be reused to indicate 55 + * that the slab was corrupted 56 + */ 57 + unsigned frozen:1; 58 + }; 59 + }; 60 + }; 61 + #ifdef system_has_freelist_aba 62 + freelist_full_t freelist_counters; 63 + #endif 47 64 }; 48 - freelist_full_t full; 49 - } freelist_aba_t; 65 + }; 50 66 51 67 /* Reuses the bits in struct page */ 52 68 struct slab { ··· 85 69 #endif 86 70 }; 87 71 /* Double-word boundary */ 88 - union { 89 - struct { 90 - void *freelist; /* first free object */ 91 - union { 92 - unsigned long counters; 93 - struct { 94 - unsigned inuse:16; 95 - unsigned objects:15; 96 - /* 97 - * If slab debugging is enabled then the 98 - * frozen bit can be reused to indicate 99 - * that the slab was corrupted 100 - */ 101 - unsigned frozen:1; 102 - }; 103 - }; 104 - }; 105 - #ifdef system_has_freelist_aba 106 - freelist_aba_t freelist_counter; 107 - #endif 108 - }; 72 + struct freelist_counters; 109 73 }; 110 74 struct rcu_head rcu_head; 111 75 }; ··· 110 114 #undef SLAB_MATCH 111 115 static_assert(sizeof(struct slab) <= sizeof(struct page)); 112 116 #if defined(system_has_freelist_aba) 113 - static_assert(IS_ALIGNED(offsetof(struct slab, freelist), sizeof(freelist_aba_t))); 117 + static_assert(IS_ALIGNED(offsetof(struct slab, freelist), sizeof(struct freelist_counters))); 114 118 #endif 115 119 116 120 /**
+69 -86
mm/slub.c
··· 410 410 NR_SLUB_STAT_ITEMS 411 411 }; 412 412 413 + struct freelist_tid { 414 + union { 415 + struct { 416 + void *freelist; /* Pointer to next available object */ 417 + unsigned long tid; /* Globally unique transaction id */ 418 + }; 419 + freelist_full_t freelist_tid; 420 + }; 421 + }; 422 + 413 423 /* 414 424 * When changing the layout, make sure freelist and tid are still compatible 415 425 * with this_cpu_cmpxchg_double() alignment requirements. 416 426 */ 417 427 struct kmem_cache_cpu { 418 - union { 419 - struct { 420 - void **freelist; /* Pointer to next available object */ 421 - unsigned long tid; /* Globally unique transaction id */ 422 - }; 423 - freelist_aba_t freelist_tid; 424 - }; 428 + struct freelist_tid; 425 429 struct slab *slab; /* The slab from which we are allocating */ 426 430 #ifdef CONFIG_SLUB_CPU_PARTIAL 427 431 struct slab *partial; /* Partially allocated slabs */ ··· 760 756 } 761 757 762 758 static inline bool 763 - __update_freelist_fast(struct slab *slab, 764 - void *freelist_old, unsigned long counters_old, 765 - void *freelist_new, unsigned long counters_new) 759 + __update_freelist_fast(struct slab *slab, struct freelist_counters *old, 760 + struct freelist_counters *new) 766 761 { 767 762 #ifdef system_has_freelist_aba 768 - freelist_aba_t old = { .freelist = freelist_old, .counter = counters_old }; 769 - freelist_aba_t new = { .freelist = freelist_new, .counter = counters_new }; 770 - 771 - return try_cmpxchg_freelist(&slab->freelist_counter.full, &old.full, new.full); 763 + return try_cmpxchg_freelist(&slab->freelist_counters, 764 + &old->freelist_counters, 765 + new->freelist_counters); 772 766 #else 773 767 return false; 774 768 #endif 775 769 } 776 770 777 771 static inline bool 778 - __update_freelist_slow(struct slab *slab, 779 - void *freelist_old, unsigned long counters_old, 780 - void *freelist_new, unsigned long counters_new) 772 + __update_freelist_slow(struct slab *slab, struct freelist_counters *old, 773 + struct freelist_counters *new) 781 774 { 782 775 bool ret = false; 783 776 784 777 slab_lock(slab); 785 - if (slab->freelist == freelist_old && 786 - slab->counters == counters_old) { 787 - slab->freelist = freelist_new; 788 - slab->counters = counters_new; 778 + if (slab->freelist == old->freelist && 779 + slab->counters == old->counters) { 780 + slab->freelist = new->freelist; 781 + slab->counters = new->counters; 789 782 ret = true; 790 783 } 791 784 slab_unlock(slab); ··· 798 797 * interrupt the operation. 799 798 */ 800 799 static inline bool __slab_update_freelist(struct kmem_cache *s, struct slab *slab, 801 - void *freelist_old, unsigned long counters_old, 802 - void *freelist_new, unsigned long counters_new, 803 - const char *n) 800 + struct freelist_counters *old, struct freelist_counters *new, const char *n) 804 801 { 805 802 bool ret; 806 803 807 804 if (USE_LOCKLESS_FAST_PATH()) 808 805 lockdep_assert_irqs_disabled(); 809 806 810 - if (s->flags & __CMPXCHG_DOUBLE) { 811 - ret = __update_freelist_fast(slab, freelist_old, counters_old, 812 - freelist_new, counters_new); 813 - } else { 814 - ret = __update_freelist_slow(slab, freelist_old, counters_old, 815 - freelist_new, counters_new); 816 - } 807 + if (s->flags & __CMPXCHG_DOUBLE) 808 + ret = __update_freelist_fast(slab, old, new); 809 + else 810 + ret = __update_freelist_slow(slab, old, new); 811 + 817 812 if (likely(ret)) 818 813 return true; 819 814 ··· 824 827 } 825 828 826 829 static inline bool slab_update_freelist(struct kmem_cache *s, struct slab *slab, 827 - void *freelist_old, unsigned long counters_old, 828 - void *freelist_new, unsigned long counters_new, 829 - const char *n) 830 + struct freelist_counters *old, struct freelist_counters *new, const char *n) 830 831 { 831 832 bool ret; 832 833 833 834 if (s->flags & __CMPXCHG_DOUBLE) { 834 - ret = __update_freelist_fast(slab, freelist_old, counters_old, 835 - freelist_new, counters_new); 835 + ret = __update_freelist_fast(slab, old, new); 836 836 } else { 837 837 unsigned long flags; 838 838 839 839 local_irq_save(flags); 840 - ret = __update_freelist_slow(slab, freelist_old, counters_old, 841 - freelist_new, counters_new); 840 + ret = __update_freelist_slow(slab, old, new); 842 841 local_irq_restore(flags); 843 842 } 844 843 if (likely(ret)) ··· 3733 3740 void *nextfree, *freelist_iter, *freelist_tail; 3734 3741 int tail = DEACTIVATE_TO_HEAD; 3735 3742 unsigned long flags = 0; 3736 - struct slab new; 3737 - struct slab old; 3743 + struct freelist_counters old, new; 3738 3744 3739 3745 if (READ_ONCE(slab->freelist)) { 3740 3746 stat(s, DEACTIVATE_REMOTE_FREES); ··· 3782 3790 } else { 3783 3791 new.freelist = old.freelist; 3784 3792 } 3785 - } while (!slab_update_freelist(s, slab, 3786 - old.freelist, old.counters, 3787 - new.freelist, new.counters, 3788 - "unfreezing slab")); 3793 + } while (!slab_update_freelist(s, slab, &old, &new, "unfreezing slab")); 3789 3794 3790 3795 /* 3791 3796 * Stage three: Manipulate the slab list based on the updated state. ··· 4370 4381 void *freelist_old, void *freelist_new, 4371 4382 unsigned long tid) 4372 4383 { 4373 - freelist_aba_t old = { .freelist = freelist_old, .counter = tid }; 4374 - freelist_aba_t new = { .freelist = freelist_new, .counter = next_tid(tid) }; 4384 + struct freelist_tid old = { .freelist = freelist_old, .tid = tid }; 4385 + struct freelist_tid new = { .freelist = freelist_new, .tid = next_tid(tid) }; 4375 4386 4376 - return this_cpu_try_cmpxchg_freelist(s->cpu_slab->freelist_tid.full, 4377 - &old.full, new.full); 4387 + return this_cpu_try_cmpxchg_freelist(s->cpu_slab->freelist_tid, 4388 + &old.freelist_tid, new.freelist_tid); 4378 4389 } 4379 4390 4380 4391 /* ··· 4387 4398 */ 4388 4399 static inline void *get_freelist(struct kmem_cache *s, struct slab *slab) 4389 4400 { 4390 - struct slab new; 4391 - unsigned long counters; 4392 - void *freelist; 4401 + struct freelist_counters old, new; 4393 4402 4394 4403 lockdep_assert_held(this_cpu_ptr(&s->cpu_slab->lock)); 4395 4404 4396 4405 do { 4397 - freelist = slab->freelist; 4398 - counters = slab->counters; 4406 + old.freelist = slab->freelist; 4407 + old.counters = slab->counters; 4399 4408 4400 - new.counters = counters; 4409 + new.freelist = NULL; 4410 + new.counters = old.counters; 4401 4411 4402 - new.inuse = slab->objects; 4403 - new.frozen = freelist != NULL; 4412 + new.inuse = old.objects; 4413 + new.frozen = old.freelist != NULL; 4404 4414 4405 - } while (!__slab_update_freelist(s, slab, 4406 - freelist, counters, 4407 - NULL, new.counters, 4408 - "get_freelist")); 4409 4415 4410 - return freelist; 4416 + } while (!__slab_update_freelist(s, slab, &old, &new, "get_freelist")); 4417 + 4418 + return old.freelist; 4411 4419 } 4412 4420 4413 4421 /* ··· 4412 4426 */ 4413 4427 static inline void *freeze_slab(struct kmem_cache *s, struct slab *slab) 4414 4428 { 4415 - struct slab new; 4416 - unsigned long counters; 4417 - void *freelist; 4429 + struct freelist_counters old, new; 4418 4430 4419 4431 do { 4420 - freelist = slab->freelist; 4421 - counters = slab->counters; 4432 + old.freelist = slab->freelist; 4433 + old.counters = slab->counters; 4422 4434 4423 - new.counters = counters; 4435 + new.freelist = NULL; 4436 + new.counters = old.counters; 4424 4437 VM_BUG_ON(new.frozen); 4425 4438 4426 - new.inuse = slab->objects; 4439 + new.inuse = old.objects; 4427 4440 new.frozen = 1; 4428 4441 4429 - } while (!slab_update_freelist(s, slab, 4430 - freelist, counters, 4431 - NULL, new.counters, 4432 - "freeze_slab")); 4442 + } while (!slab_update_freelist(s, slab, &old, &new, "freeze_slab")); 4433 4443 4434 - return freelist; 4444 + return old.freelist; 4435 4445 } 4436 4446 4437 4447 /* ··· 5859 5877 unsigned long addr) 5860 5878 5861 5879 { 5862 - void *old_head; 5863 5880 bool was_frozen, was_full; 5864 - struct slab new; 5865 - unsigned long counters; 5881 + struct freelist_counters old, new; 5866 5882 struct kmem_cache_node *n = NULL; 5867 5883 unsigned long flags; 5868 5884 bool on_node_partial; ··· 5884 5904 spin_unlock_irqrestore(&n->list_lock, flags); 5885 5905 n = NULL; 5886 5906 } 5887 - old_head = slab->freelist; 5888 - counters = slab->counters; 5889 - set_freepointer(s, tail, old_head); 5890 - new.counters = counters; 5891 - was_frozen = !!new.frozen; 5892 - was_full = (old_head == NULL); 5907 + 5908 + old.freelist = slab->freelist; 5909 + old.counters = slab->counters; 5910 + 5911 + was_full = (old.freelist == NULL); 5912 + was_frozen = old.frozen; 5913 + 5914 + set_freepointer(s, tail, old.freelist); 5915 + 5916 + new.freelist = head; 5917 + new.counters = old.counters; 5893 5918 new.inuse -= cnt; 5919 + 5894 5920 /* 5895 5921 * Might need to be taken off (due to becoming empty) or added 5896 5922 * to (due to not being full anymore) the partial list. ··· 5925 5939 } 5926 5940 } 5927 5941 5928 - } while (!slab_update_freelist(s, slab, 5929 - old_head, counters, 5930 - head, new.counters, 5931 - "__slab_free")); 5942 + } while (!slab_update_freelist(s, slab, &old, &new, "__slab_free")); 5932 5943 5933 5944 if (likely(!n)) { 5934 5945
+3 -1
scripts/Makefile.extrawarn
··· 28 28 KBUILD_CFLAGS-$(CONFIG_CC_NO_ARRAY_BOUNDS) += -Wno-array-bounds 29 29 30 30 ifdef CONFIG_CC_IS_CLANG 31 - # The kernel builds with '-std=gnu11' so use of GNU extensions is acceptable. 31 + # The kernel builds with '-std=gnu11' and '-fms-extensions' so use of GNU and 32 + # Microsoft extensions is acceptable. 32 33 KBUILD_CFLAGS += -Wno-gnu 34 + KBUILD_CFLAGS += -Wno-microsoft-anon-tag 33 35 34 36 # Clang checks for overflow/truncation with '%p', while GCC does not: 35 37 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111219