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 tag 'core_guards_for_6.5_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue

Pull scope-based resource management infrastructure from Peter Zijlstra:
"These are the first few patches in the Scope-based Resource Management
series that introduce the infrastructure but not any conversions as of
yet.

Adding the infrastructure now allows multiple people to start using
them.

Of note is that Sparse will need some work since it doesn't yet
understand this attribute and might have decl-after-stmt issues"

* tag 'core_guards_for_6.5_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue:
kbuild: Drop -Wdeclaration-after-statement
locking: Introduce __cleanup() based infrastructure
apparmor: Free up __cleanup() name
dmaengine: ioat: Free up __cleanup() name

+282 -17
+1 -5
Makefile
··· 449 449 HOSTPKG_CONFIG = pkg-config 450 450 451 451 KBUILD_USERHOSTCFLAGS := -Wall -Wmissing-prototypes -Wstrict-prototypes \ 452 - -O2 -fomit-frame-pointer -std=gnu11 \ 453 - -Wdeclaration-after-statement 452 + -O2 -fomit-frame-pointer -std=gnu11 454 453 KBUILD_USERCFLAGS := $(KBUILD_USERHOSTCFLAGS) $(USERCFLAGS) 455 454 KBUILD_USERLDFLAGS := $(USERLDFLAGS) 456 455 ··· 1012 1013 1013 1014 # arch Makefile may override CC so keep this after arch Makefile is included 1014 1015 NOSTDINC_FLAGS += -nostdinc 1015 - 1016 - # warn about C99 declaration after statement 1017 - KBUILD_CFLAGS += -Wdeclaration-after-statement 1018 1016 1019 1017 # Variable Length Arrays (VLAs) should not be used anywhere in the kernel 1020 1018 KBUILD_CFLAGS += -Wvla
-2
arch/arm64/kernel/vdso32/Makefile
··· 65 65 -fno-strict-aliasing -fno-common \ 66 66 -Werror-implicit-function-declaration \ 67 67 -Wno-format-security \ 68 - -Wdeclaration-after-statement \ 69 68 -std=gnu11 70 69 VDSO_CFLAGS += -O2 71 70 # Some useful compiler-dependent flags from top-level Makefile 72 - VDSO_CFLAGS += $(call cc32-option,-Wdeclaration-after-statement,) 73 71 VDSO_CFLAGS += $(call cc32-option,-Wno-pointer-sign) 74 72 VDSO_CFLAGS += -fno-strict-overflow 75 73 VDSO_CFLAGS += $(call cc32-option,-Werror=strict-prototypes)
+6 -6
drivers/dma/ioat/dma.c
··· 584 584 } 585 585 586 586 /** 587 - * __cleanup - reclaim used descriptors 587 + * __ioat_cleanup - reclaim used descriptors 588 588 * @ioat_chan: channel (ring) to clean 589 589 * @phys_complete: zeroed (or not) completion address (from status) 590 590 */ 591 - static void __cleanup(struct ioatdma_chan *ioat_chan, dma_addr_t phys_complete) 591 + static void __ioat_cleanup(struct ioatdma_chan *ioat_chan, dma_addr_t phys_complete) 592 592 { 593 593 struct ioatdma_device *ioat_dma = ioat_chan->ioat_dma; 594 594 struct ioat_ring_ent *desc; ··· 675 675 spin_lock_bh(&ioat_chan->cleanup_lock); 676 676 677 677 if (ioat_cleanup_preamble(ioat_chan, &phys_complete)) 678 - __cleanup(ioat_chan, phys_complete); 678 + __ioat_cleanup(ioat_chan, phys_complete); 679 679 680 680 if (is_ioat_halted(*ioat_chan->completion)) { 681 681 u32 chanerr = readl(ioat_chan->reg_base + IOAT_CHANERR_OFFSET); ··· 712 712 713 713 ioat_quiesce(ioat_chan, 0); 714 714 if (ioat_cleanup_preamble(ioat_chan, &phys_complete)) 715 - __cleanup(ioat_chan, phys_complete); 715 + __ioat_cleanup(ioat_chan, phys_complete); 716 716 717 717 __ioat_restart_chan(ioat_chan); 718 718 } ··· 786 786 787 787 /* cleanup so tail points to descriptor that caused the error */ 788 788 if (ioat_cleanup_preamble(ioat_chan, &phys_complete)) 789 - __cleanup(ioat_chan, phys_complete); 789 + __ioat_cleanup(ioat_chan, phys_complete); 790 790 791 791 chanerr = readl(ioat_chan->reg_base + IOAT_CHANERR_OFFSET); 792 792 pci_read_config_dword(pdev, IOAT_PCI_CHANERR_INT_OFFSET, &chanerr_int); ··· 943 943 /* timer restarted in ioat_cleanup_preamble 944 944 * and IOAT_COMPLETION_ACK cleared 945 945 */ 946 - __cleanup(ioat_chan, phys_complete); 946 + __ioat_cleanup(ioat_chan, phys_complete); 947 947 goto unlock_out; 948 948 } 949 949
+171
include/linux/cleanup.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0 */ 2 + #ifndef __LINUX_GUARDS_H 3 + #define __LINUX_GUARDS_H 4 + 5 + #include <linux/compiler.h> 6 + 7 + /* 8 + * DEFINE_FREE(name, type, free): 9 + * simple helper macro that defines the required wrapper for a __free() 10 + * based cleanup function. @free is an expression using '_T' to access 11 + * the variable. 12 + * 13 + * __free(name): 14 + * variable attribute to add a scoped based cleanup to the variable. 15 + * 16 + * no_free_ptr(var): 17 + * like a non-atomic xchg(var, NULL), such that the cleanup function will 18 + * be inhibited -- provided it sanely deals with a NULL value. 19 + * 20 + * return_ptr(p): 21 + * returns p while inhibiting the __free(). 22 + * 23 + * Ex. 24 + * 25 + * DEFINE_FREE(kfree, void *, if (_T) kfree(_T)) 26 + * 27 + * struct obj *p __free(kfree) = kmalloc(...); 28 + * if (!p) 29 + * return NULL; 30 + * 31 + * if (!init_obj(p)) 32 + * return NULL; 33 + * 34 + * return_ptr(p); 35 + */ 36 + 37 + #define DEFINE_FREE(_name, _type, _free) \ 38 + static inline void __free_##_name(void *p) { _type _T = *(_type *)p; _free; } 39 + 40 + #define __free(_name) __cleanup(__free_##_name) 41 + 42 + #define no_free_ptr(p) \ 43 + ({ __auto_type __ptr = (p); (p) = NULL; __ptr; }) 44 + 45 + #define return_ptr(p) return no_free_ptr(p) 46 + 47 + 48 + /* 49 + * DEFINE_CLASS(name, type, exit, init, init_args...): 50 + * helper to define the destructor and constructor for a type. 51 + * @exit is an expression using '_T' -- similar to FREE above. 52 + * @init is an expression in @init_args resulting in @type 53 + * 54 + * EXTEND_CLASS(name, ext, init, init_args...): 55 + * extends class @name to @name@ext with the new constructor 56 + * 57 + * CLASS(name, var)(args...): 58 + * declare the variable @var as an instance of the named class 59 + * 60 + * Ex. 61 + * 62 + * DEFINE_CLASS(fdget, struct fd, fdput(_T), fdget(fd), int fd) 63 + * 64 + * CLASS(fdget, f)(fd); 65 + * if (!f.file) 66 + * return -EBADF; 67 + * 68 + * // use 'f' without concern 69 + */ 70 + 71 + #define DEFINE_CLASS(_name, _type, _exit, _init, _init_args...) \ 72 + typedef _type class_##_name##_t; \ 73 + static inline void class_##_name##_destructor(_type *p) \ 74 + { _type _T = *p; _exit; } \ 75 + static inline _type class_##_name##_constructor(_init_args) \ 76 + { _type t = _init; return t; } 77 + 78 + #define EXTEND_CLASS(_name, ext, _init, _init_args...) \ 79 + typedef class_##_name##_t class_##_name##ext##_t; \ 80 + static inline void class_##_name##ext##_destructor(class_##_name##_t *p)\ 81 + { class_##_name##_destructor(p); } \ 82 + static inline class_##_name##_t class_##_name##ext##_constructor(_init_args) \ 83 + { class_##_name##_t t = _init; return t; } 84 + 85 + #define CLASS(_name, var) \ 86 + class_##_name##_t var __cleanup(class_##_name##_destructor) = \ 87 + class_##_name##_constructor 88 + 89 + 90 + /* 91 + * DEFINE_GUARD(name, type, lock, unlock): 92 + * trivial wrapper around DEFINE_CLASS() above specifically 93 + * for locks. 94 + * 95 + * guard(name): 96 + * an anonymous instance of the (guard) class 97 + * 98 + * scoped_guard (name, args...) { }: 99 + * similar to CLASS(name, scope)(args), except the variable (with the 100 + * explicit name 'scope') is declard in a for-loop such that its scope is 101 + * bound to the next (compound) statement. 102 + * 103 + */ 104 + 105 + #define DEFINE_GUARD(_name, _type, _lock, _unlock) \ 106 + DEFINE_CLASS(_name, _type, _unlock, ({ _lock; _T; }), _type _T) 107 + 108 + #define guard(_name) \ 109 + CLASS(_name, __UNIQUE_ID(guard)) 110 + 111 + #define scoped_guard(_name, args...) \ 112 + for (CLASS(_name, scope)(args), \ 113 + *done = NULL; !done; done = (void *)1) 114 + 115 + /* 116 + * Additional helper macros for generating lock guards with types, either for 117 + * locks that don't have a native type (eg. RCU, preempt) or those that need a 118 + * 'fat' pointer (eg. spin_lock_irqsave). 119 + * 120 + * DEFINE_LOCK_GUARD_0(name, lock, unlock, ...) 121 + * DEFINE_LOCK_GUARD_1(name, type, lock, unlock, ...) 122 + * 123 + * will result in the following type: 124 + * 125 + * typedef struct { 126 + * type *lock; // 'type := void' for the _0 variant 127 + * __VA_ARGS__; 128 + * } class_##name##_t; 129 + * 130 + * As above, both _lock and _unlock are statements, except this time '_T' will 131 + * be a pointer to the above struct. 132 + */ 133 + 134 + #define __DEFINE_UNLOCK_GUARD(_name, _type, _unlock, ...) \ 135 + typedef struct { \ 136 + _type *lock; \ 137 + __VA_ARGS__; \ 138 + } class_##_name##_t; \ 139 + \ 140 + static inline void class_##_name##_destructor(class_##_name##_t *_T) \ 141 + { \ 142 + if (_T->lock) { _unlock; } \ 143 + } 144 + 145 + 146 + #define __DEFINE_LOCK_GUARD_1(_name, _type, _lock) \ 147 + static inline class_##_name##_t class_##_name##_constructor(_type *l) \ 148 + { \ 149 + class_##_name##_t _t = { .lock = l }, *_T = &_t; \ 150 + _lock; \ 151 + return _t; \ 152 + } 153 + 154 + #define __DEFINE_LOCK_GUARD_0(_name, _lock) \ 155 + static inline class_##_name##_t class_##_name##_constructor(void) \ 156 + { \ 157 + class_##_name##_t _t = { .lock = (void*)1 }, \ 158 + *_T __maybe_unused = &_t; \ 159 + _lock; \ 160 + return _t; \ 161 + } 162 + 163 + #define DEFINE_LOCK_GUARD_1(_name, _type, _lock, _unlock, ...) \ 164 + __DEFINE_UNLOCK_GUARD(_name, _type, _unlock, __VA_ARGS__) \ 165 + __DEFINE_LOCK_GUARD_1(_name, _type, _lock) 166 + 167 + #define DEFINE_LOCK_GUARD_0(_name, _lock, _unlock, ...) \ 168 + __DEFINE_UNLOCK_GUARD(_name, void, _unlock, __VA_ARGS__) \ 169 + __DEFINE_LOCK_GUARD_0(_name, _lock) 170 + 171 + #endif /* __LINUX_GUARDS_H */
+9
include/linux/compiler-clang.h
··· 5 5 6 6 /* Compiler specific definitions for Clang compiler */ 7 7 8 + /* 9 + * Clang prior to 17 is being silly and considers many __cleanup() variables 10 + * as unused (because they are, their sole purpose is to go out of scope). 11 + * 12 + * https://reviews.llvm.org/D152180 13 + */ 14 + #undef __cleanup 15 + #define __cleanup(func) __maybe_unused __attribute__((__cleanup__(func))) 16 + 8 17 /* same as gcc, this was present in clang-2.6 so we can assume it works 9 18 * with any version that can compile the kernel 10 19 */
+6
include/linux/compiler_attributes.h
··· 70 70 #define __assume_aligned(a, ...) __attribute__((__assume_aligned__(a, ## __VA_ARGS__))) 71 71 72 72 /* 73 + * gcc: https://gcc.gnu.org/onlinedocs/gcc/Common-Variable-Attributes.html#index-cleanup-variable-attribute 74 + * clang: https://clang.llvm.org/docs/AttributeReference.html#cleanup 75 + */ 76 + #define __cleanup(func) __attribute__((__cleanup__(func))) 77 + 78 + /* 73 79 * Note the long name. 74 80 * 75 81 * gcc: https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-const-function-attribute
+7
include/linux/device.h
··· 30 30 #include <linux/device/bus.h> 31 31 #include <linux/device/class.h> 32 32 #include <linux/device/driver.h> 33 + #include <linux/cleanup.h> 33 34 #include <asm/device.h> 34 35 35 36 struct device; ··· 1020 1019 void device_initialize(struct device *dev); 1021 1020 int __must_check device_add(struct device *dev); 1022 1021 void device_del(struct device *dev); 1022 + 1023 + DEFINE_FREE(device_del, struct device *, if (_T) device_del(_T)) 1024 + 1023 1025 int device_for_each_child(struct device *dev, void *data, 1024 1026 int (*fn)(struct device *dev, void *data)); 1025 1027 int device_for_each_child_reverse(struct device *dev, void *data, ··· 1190 1186 */ 1191 1187 struct device *get_device(struct device *dev); 1192 1188 void put_device(struct device *dev); 1189 + 1190 + DEFINE_FREE(put_device, struct device *, if (_T) put_device(_T)) 1191 + 1193 1192 bool kill_device(struct device *dev); 1194 1193 1195 1194 #ifdef CONFIG_DEVTMPFS
+6
include/linux/file.h
··· 10 10 #include <linux/types.h> 11 11 #include <linux/posix_types.h> 12 12 #include <linux/errno.h> 13 + #include <linux/cleanup.h> 13 14 14 15 struct file; 15 16 ··· 81 80 fdput(f); 82 81 } 83 82 83 + DEFINE_CLASS(fd, struct fd, fdput(_T), fdget(fd), int fd) 84 + 84 85 extern int f_dupfd(unsigned int from, struct file *file, unsigned flags); 85 86 extern int replace_fd(unsigned fd, struct file *file, unsigned flags); 86 87 extern void set_close_on_exec(unsigned int fd, int flag); ··· 90 87 extern int __get_unused_fd_flags(unsigned flags, unsigned long nofile); 91 88 extern int get_unused_fd_flags(unsigned flags); 92 89 extern void put_unused_fd(unsigned int fd); 90 + 91 + DEFINE_CLASS(get_unused_fd, int, if (_T >= 0) put_unused_fd(_T), 92 + get_unused_fd_flags(flags), unsigned flags) 93 93 94 94 extern void fd_install(unsigned int fd, struct file *file); 95 95
+7
include/linux/irqflags.h
··· 13 13 #define _LINUX_TRACE_IRQFLAGS_H 14 14 15 15 #include <linux/typecheck.h> 16 + #include <linux/cleanup.h> 16 17 #include <asm/irqflags.h> 17 18 #include <asm/percpu.h> 18 19 ··· 267 266 #endif /* CONFIG_TRACE_IRQFLAGS_SUPPORT */ 268 267 269 268 #define irqs_disabled_flags(flags) raw_irqs_disabled_flags(flags) 269 + 270 + DEFINE_LOCK_GUARD_0(irq, local_irq_disable(), local_irq_enable()) 271 + DEFINE_LOCK_GUARD_0(irqsave, 272 + local_irq_save(_T->flags), 273 + local_irq_restore(_T->flags), 274 + unsigned long flags) 270 275 271 276 #endif
+4
include/linux/mutex.h
··· 19 19 #include <asm/processor.h> 20 20 #include <linux/osq_lock.h> 21 21 #include <linux/debug_locks.h> 22 + #include <linux/cleanup.h> 22 23 23 24 #ifdef CONFIG_DEBUG_LOCK_ALLOC 24 25 # define __DEP_MAP_MUTEX_INITIALIZER(lockname) \ ··· 219 218 extern void mutex_unlock(struct mutex *lock); 220 219 221 220 extern int atomic_dec_and_mutex_lock(atomic_t *cnt, struct mutex *lock); 221 + 222 + DEFINE_GUARD(mutex, struct mutex *, mutex_lock(_T), mutex_unlock(_T)) 223 + DEFINE_FREE(mutex, struct mutex *, if (_T) mutex_unlock(_T)) 222 224 223 225 #endif /* __LINUX_MUTEX_H */
+4
include/linux/percpu.h
··· 8 8 #include <linux/cpumask.h> 9 9 #include <linux/pfn.h> 10 10 #include <linux/init.h> 11 + #include <linux/cleanup.h> 11 12 12 13 #include <asm/percpu.h> 13 14 ··· 126 125 extern void __percpu *__alloc_percpu_gfp(size_t size, size_t align, gfp_t gfp) __alloc_size(1); 127 126 extern void __percpu *__alloc_percpu(size_t size, size_t align) __alloc_size(1); 128 127 extern void free_percpu(void __percpu *__pdata); 128 + 129 + DEFINE_FREE(free_percpu, void __percpu *, free_percpu(_T)) 130 + 129 131 extern phys_addr_t per_cpu_ptr_to_phys(void *addr); 130 132 131 133 #define alloc_percpu_gfp(type, gfp) \
+5
include/linux/preempt.h
··· 8 8 */ 9 9 10 10 #include <linux/linkage.h> 11 + #include <linux/cleanup.h> 11 12 #include <linux/list.h> 12 13 13 14 /* ··· 463 462 if (IS_ENABLED(CONFIG_PREEMPT_RT)) 464 463 preempt_enable(); 465 464 } 465 + 466 + DEFINE_LOCK_GUARD_0(preempt, preempt_disable(), preempt_enable()) 467 + DEFINE_LOCK_GUARD_0(preempt_notrace, preempt_disable_notrace(), preempt_enable_notrace()) 468 + DEFINE_LOCK_GUARD_0(migrate, migrate_disable(), migrate_enable()) 466 469 467 470 #endif /* __LINUX_PREEMPT_H */
+3
include/linux/rcupdate.h
··· 27 27 #include <linux/preempt.h> 28 28 #include <linux/bottom_half.h> 29 29 #include <linux/lockdep.h> 30 + #include <linux/cleanup.h> 30 31 #include <asm/processor.h> 31 32 #include <linux/cpumask.h> 32 33 #include <linux/context_tracking_irq.h> ··· 1057 1056 /* kernel/ksysfs.c definitions */ 1058 1057 extern int rcu_expedited; 1059 1058 extern int rcu_normal; 1059 + 1060 + DEFINE_LOCK_GUARD_0(rcu, rcu_read_lock(), rcu_read_unlock()) 1060 1061 1061 1062 #endif /* __LINUX_RCUPDATE_H */
+8
include/linux/rwsem.h
··· 15 15 #include <linux/spinlock.h> 16 16 #include <linux/atomic.h> 17 17 #include <linux/err.h> 18 + #include <linux/cleanup.h> 18 19 19 20 #ifdef CONFIG_DEBUG_LOCK_ALLOC 20 21 # define __RWSEM_DEP_MAP_INIT(lockname) \ ··· 201 200 * release a write lock 202 201 */ 203 202 extern void up_write(struct rw_semaphore *sem); 203 + 204 + DEFINE_GUARD(rwsem_read, struct rw_semaphore *, down_read(_T), up_read(_T)) 205 + DEFINE_GUARD(rwsem_write, struct rw_semaphore *, down_write(_T), up_write(_T)) 206 + 207 + DEFINE_FREE(up_read, struct rw_semaphore *, if (_T) up_read(_T)) 208 + DEFINE_FREE(up_write, struct rw_semaphore *, if (_T) up_write(_T)) 209 + 204 210 205 211 /* 206 212 * downgrade write lock to read lock
+2
include/linux/sched/task.h
··· 125 125 __put_task_struct(t); 126 126 } 127 127 128 + DEFINE_FREE(put_task, struct task_struct *, if (_T) put_task_struct(_T)) 129 + 128 130 static inline void put_task_struct_many(struct task_struct *t, int nr) 129 131 { 130 132 if (refcount_sub_and_test(nr, &t->usage))
+3
include/linux/slab.h
··· 18 18 #include <linux/types.h> 19 19 #include <linux/workqueue.h> 20 20 #include <linux/percpu-refcount.h> 21 + #include <linux/cleanup.h> 21 22 22 23 23 24 /* ··· 226 225 void kfree(const void *objp); 227 226 void kfree_sensitive(const void *objp); 228 227 size_t __ksize(const void *objp); 228 + 229 + DEFINE_FREE(kfree, void *, if (_T) kfree(_T)) 229 230 230 231 /** 231 232 * ksize - Report actual allocation size of associated object
+31
include/linux/spinlock.h
··· 61 61 #include <linux/stringify.h> 62 62 #include <linux/bottom_half.h> 63 63 #include <linux/lockdep.h> 64 + #include <linux/cleanup.h> 64 65 #include <asm/barrier.h> 65 66 #include <asm/mmiowb.h> 66 67 ··· 502 501 }) 503 502 504 503 void free_bucket_spinlocks(spinlock_t *locks); 504 + 505 + DEFINE_LOCK_GUARD_1(raw_spinlock, raw_spinlock_t, 506 + raw_spin_lock(_T->lock), 507 + raw_spin_unlock(_T->lock)) 508 + 509 + DEFINE_LOCK_GUARD_1(raw_spinlock_nested, raw_spinlock_t, 510 + raw_spin_lock_nested(_T->lock, SINGLE_DEPTH_NESTING), 511 + raw_spin_unlock(_T->lock)) 512 + 513 + DEFINE_LOCK_GUARD_1(raw_spinlock_irq, raw_spinlock_t, 514 + raw_spin_lock_irq(_T->lock), 515 + raw_spin_unlock_irq(_T->lock)) 516 + 517 + DEFINE_LOCK_GUARD_1(raw_spinlock_irqsave, raw_spinlock_t, 518 + raw_spin_lock_irqsave(_T->lock, _T->flags), 519 + raw_spin_unlock_irqrestore(_T->lock, _T->flags), 520 + unsigned long flags) 521 + 522 + DEFINE_LOCK_GUARD_1(spinlock, spinlock_t, 523 + spin_lock(_T->lock), 524 + spin_unlock(_T->lock)) 525 + 526 + DEFINE_LOCK_GUARD_1(spinlock_irq, spinlock_t, 527 + spin_lock_irq(_T->lock), 528 + spin_unlock_irq(_T->lock)) 529 + 530 + DEFINE_LOCK_GUARD_1(spinlock_irqsave, spinlock_t, 531 + spin_lock_irqsave(_T->lock, _T->flags), 532 + spin_unlock_irqrestore(_T->lock, _T->flags), 533 + unsigned long flags) 505 534 506 535 #undef __LINUX_INSIDE_SPINLOCK_H 507 536 #endif /* __LINUX_SPINLOCK_H */
+5
include/linux/srcu.h
··· 343 343 /* __srcu_read_unlock has smp_mb() internally so nothing to do here. */ 344 344 } 345 345 346 + DEFINE_LOCK_GUARD_1(srcu, struct srcu_struct, 347 + _T->idx = srcu_read_lock(_T->lock), 348 + srcu_read_unlock(_T->lock, _T->idx), 349 + int idx) 350 + 346 351 #endif
+1 -1
scripts/checkpatch.pl
··· 5046 5046 if|for|while|switch|return|case| 5047 5047 volatile|__volatile__| 5048 5048 __attribute__|format|__extension__| 5049 - asm|__asm__)$/x) 5049 + asm|__asm__|scoped_guard)$/x) 5050 5050 { 5051 5051 # cpp #define statements have non-optional spaces, ie 5052 5052 # if there is a space between the name and the open
+3 -3
security/apparmor/include/lib.h
··· 232 232 */ 233 233 #define fn_label_build(L, P, GFP, FN) \ 234 234 ({ \ 235 - __label__ __cleanup, __done; \ 235 + __label__ __do_cleanup, __done; \ 236 236 struct aa_label *__new_; \ 237 237 \ 238 238 if ((L)->size > 1) { \ ··· 250 250 __new_ = (FN); \ 251 251 AA_BUG(!__new_); \ 252 252 if (IS_ERR(__new_)) \ 253 - goto __cleanup; \ 253 + goto __do_cleanup; \ 254 254 __lvec[__j++] = __new_; \ 255 255 } \ 256 256 for (__j = __count = 0; __j < (L)->size; __j++) \ ··· 272 272 vec_cleanup(profile, __pvec, __count); \ 273 273 } else \ 274 274 __new_ = NULL; \ 275 - __cleanup: \ 275 + __do_cleanup: \ 276 276 vec_cleanup(label, __lvec, (L)->size); \ 277 277 } else { \ 278 278 (P) = labels_profile(L); \