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 'akpm' (patches from Andrew)

Merge misc fixes from Andrew Morton:

- A few y2038 fixes which missed the merge window while dependencies
in NFS were being sorted out.

- A bunch of fixes. Some minor, some not.

* emailed patches from Andrew Morton <akpm@linux-foundation.org>:
MAINTAINERS: use tabs for SAFESETID
lib/stackdepot.c: fix global out-of-bounds in stack_slabs
mm/sparsemem: pfn_to_page is not valid yet on SPARSEMEM
mm/vmscan.c: don't round up scan size for online memory cgroup
lib/string.c: update match_string() doc-strings with correct behavior
mm/memcontrol.c: lost css_put in memcg_expand_shrinker_maps()
mm/swapfile.c: fix a comment in sys_swapon()
scripts/get_maintainer.pl: deprioritize old Fixes: addresses
get_maintainer: remove uses of P: for maintainer name
selftests/vm: add missed tests in run_vmtests
include/uapi/linux/swab.h: fix userspace breakage, use __BITS_PER_LONG for swap
Revert "ipc,sem: remove uneeded sem_undo_list lock usage in exit_sem()"
y2038: hide timeval/timespec/itimerval/itimerspec types
y2038: remove unused time32 interfaces
y2038: remove ktime to/from timespec/timeval conversion

+93 -419
+4 -4
MAINTAINERS
··· 14582 14582 F: include/media/drv-intf/saa7146* 14583 14583 14584 14584 SAFESETID SECURITY MODULE 14585 - M: Micah Morton <mortonm@chromium.org> 14586 - S: Supported 14587 - F: security/safesetid/ 14588 - F: Documentation/admin-guide/LSM/SafeSetID.rst 14585 + M: Micah Morton <mortonm@chromium.org> 14586 + S: Supported 14587 + F: security/safesetid/ 14588 + F: Documentation/admin-guide/LSM/SafeSetID.rst 14589 14589 14590 14590 SAMSUNG AUDIO (ASoC) DRIVERS 14591 14591 M: Krzysztof Kozlowski <krzk@kernel.org>
-29
include/linux/compat.h
··· 248 248 } _sifields; 249 249 } compat_siginfo_t; 250 250 251 - /* 252 - * These functions operate on 32- or 64-bit specs depending on 253 - * COMPAT_USE_64BIT_TIME, hence the void user pointer arguments. 254 - */ 255 - extern int compat_get_timespec(struct timespec *, const void __user *); 256 - extern int compat_put_timespec(const struct timespec *, void __user *); 257 - extern int compat_get_timeval(struct timeval *, const void __user *); 258 - extern int compat_put_timeval(const struct timeval *, void __user *); 259 - 260 251 struct compat_iovec { 261 252 compat_uptr_t iov_base; 262 253 compat_size_t iov_len; ··· 406 415 int copy_siginfo_to_user32(struct compat_siginfo __user *to, const kernel_siginfo_t *from); 407 416 int get_compat_sigevent(struct sigevent *event, 408 417 const struct compat_sigevent __user *u_event); 409 - 410 - static inline int old_timeval32_compare(struct old_timeval32 *lhs, 411 - struct old_timeval32 *rhs) 412 - { 413 - if (lhs->tv_sec < rhs->tv_sec) 414 - return -1; 415 - if (lhs->tv_sec > rhs->tv_sec) 416 - return 1; 417 - return lhs->tv_usec - rhs->tv_usec; 418 - } 419 - 420 - static inline int old_timespec32_compare(struct old_timespec32 *lhs, 421 - struct old_timespec32 *rhs) 422 - { 423 - if (lhs->tv_sec < rhs->tv_sec) 424 - return -1; 425 - if (lhs->tv_sec > rhs->tv_sec) 426 - return 1; 427 - return lhs->tv_nsec - rhs->tv_nsec; 428 - } 429 418 430 419 extern int get_compat_sigset(sigset_t *set, const compat_sigset_t __user *compat); 431 420
-37
include/linux/ktime.h
··· 66 66 */ 67 67 #define ktime_sub_ns(kt, nsval) ((kt) - (nsval)) 68 68 69 - /* convert a timespec to ktime_t format: */ 70 - static inline ktime_t timespec_to_ktime(struct timespec ts) 71 - { 72 - return ktime_set(ts.tv_sec, ts.tv_nsec); 73 - } 74 - 75 69 /* convert a timespec64 to ktime_t format: */ 76 70 static inline ktime_t timespec64_to_ktime(struct timespec64 ts) 77 71 { 78 72 return ktime_set(ts.tv_sec, ts.tv_nsec); 79 73 } 80 74 81 - /* convert a timeval to ktime_t format: */ 82 - static inline ktime_t timeval_to_ktime(struct timeval tv) 83 - { 84 - return ktime_set(tv.tv_sec, tv.tv_usec * NSEC_PER_USEC); 85 - } 86 - 87 - /* Map the ktime_t to timespec conversion to ns_to_timespec function */ 88 - #define ktime_to_timespec(kt) ns_to_timespec((kt)) 89 - 90 75 /* Map the ktime_t to timespec conversion to ns_to_timespec function */ 91 76 #define ktime_to_timespec64(kt) ns_to_timespec64((kt)) 92 - 93 - /* Map the ktime_t to timeval conversion to ns_to_timeval function */ 94 - #define ktime_to_timeval(kt) ns_to_timeval((kt)) 95 77 96 78 /* Convert ktime_t to nanoseconds */ 97 79 static inline s64 ktime_to_ns(const ktime_t kt) ··· 196 214 } 197 215 198 216 extern ktime_t ktime_add_safe(const ktime_t lhs, const ktime_t rhs); 199 - 200 - /** 201 - * ktime_to_timespec_cond - convert a ktime_t variable to timespec 202 - * format only if the variable contains data 203 - * @kt: the ktime_t variable to convert 204 - * @ts: the timespec variable to store the result in 205 - * 206 - * Return: %true if there was a successful conversion, %false if kt was 0. 207 - */ 208 - static inline __must_check bool ktime_to_timespec_cond(const ktime_t kt, 209 - struct timespec *ts) 210 - { 211 - if (kt) { 212 - *ts = ktime_to_timespec(kt); 213 - return true; 214 - } else { 215 - return false; 216 - } 217 - } 218 217 219 218 /** 220 219 * ktime_to_timespec64_cond - convert a ktime_t variable to timespec64
+1 -153
include/linux/time32.h
··· 12 12 #include <linux/time64.h> 13 13 #include <linux/timex.h> 14 14 15 - #define TIME_T_MAX (__kernel_old_time_t)((1UL << ((sizeof(__kernel_old_time_t) << 3) - 1)) - 1) 16 - 17 15 typedef s32 old_time32_t; 18 16 19 17 struct old_timespec32 { ··· 71 73 int get_old_timex32(struct __kernel_timex *, const struct old_timex32 __user *); 72 74 int put_old_timex32(struct old_timex32 __user *, const struct __kernel_timex *); 73 75 74 - #if __BITS_PER_LONG == 64 75 - 76 - /* timespec64 is defined as timespec here */ 77 - static inline struct timespec timespec64_to_timespec(const struct timespec64 ts64) 78 - { 79 - return *(const struct timespec *)&ts64; 80 - } 81 - 82 - static inline struct timespec64 timespec_to_timespec64(const struct timespec ts) 83 - { 84 - return *(const struct timespec64 *)&ts; 85 - } 86 - 87 - #else 88 - static inline struct timespec timespec64_to_timespec(const struct timespec64 ts64) 89 - { 90 - struct timespec ret; 91 - 92 - ret.tv_sec = (time_t)ts64.tv_sec; 93 - ret.tv_nsec = ts64.tv_nsec; 94 - return ret; 95 - } 96 - 97 - static inline struct timespec64 timespec_to_timespec64(const struct timespec ts) 98 - { 99 - struct timespec64 ret; 100 - 101 - ret.tv_sec = ts.tv_sec; 102 - ret.tv_nsec = ts.tv_nsec; 103 - return ret; 104 - } 105 - #endif 106 - 107 - static inline int timespec_equal(const struct timespec *a, 108 - const struct timespec *b) 109 - { 110 - return (a->tv_sec == b->tv_sec) && (a->tv_nsec == b->tv_nsec); 111 - } 112 - 113 - /* 114 - * lhs < rhs: return <0 115 - * lhs == rhs: return 0 116 - * lhs > rhs: return >0 117 - */ 118 - static inline int timespec_compare(const struct timespec *lhs, const struct timespec *rhs) 119 - { 120 - if (lhs->tv_sec < rhs->tv_sec) 121 - return -1; 122 - if (lhs->tv_sec > rhs->tv_sec) 123 - return 1; 124 - return lhs->tv_nsec - rhs->tv_nsec; 125 - } 126 - 127 - /* 128 - * Returns true if the timespec is norm, false if denorm: 129 - */ 130 - static inline bool timespec_valid(const struct timespec *ts) 131 - { 132 - /* Dates before 1970 are bogus */ 133 - if (ts->tv_sec < 0) 134 - return false; 135 - /* Can't have more nanoseconds then a second */ 136 - if ((unsigned long)ts->tv_nsec >= NSEC_PER_SEC) 137 - return false; 138 - return true; 139 - } 140 - 141 76 /** 142 - * timespec_to_ns - Convert timespec to nanoseconds 143 - * @ts: pointer to the timespec variable to be converted 144 - * 145 - * Returns the scalar nanosecond representation of the timespec 146 - * parameter. 147 - */ 148 - static inline s64 timespec_to_ns(const struct timespec *ts) 149 - { 150 - return ((s64) ts->tv_sec * NSEC_PER_SEC) + ts->tv_nsec; 151 - } 152 - 153 - /** 154 - * ns_to_timespec - Convert nanoseconds to timespec 155 - * @nsec: the nanoseconds value to be converted 156 - * 157 - * Returns the timespec representation of the nsec parameter. 158 - */ 159 - extern struct timespec ns_to_timespec(const s64 nsec); 160 - 161 - /** 162 - * timespec_add_ns - Adds nanoseconds to a timespec 163 - * @a: pointer to timespec to be incremented 164 - * @ns: unsigned nanoseconds value to be added 165 - * 166 - * This must always be inlined because its used from the x86-64 vdso, 167 - * which cannot call other kernel functions. 168 - */ 169 - static __always_inline void timespec_add_ns(struct timespec *a, u64 ns) 170 - { 171 - a->tv_sec += __iter_div_u64_rem(a->tv_nsec + ns, NSEC_PER_SEC, &ns); 172 - a->tv_nsec = ns; 173 - } 174 - 175 - static inline unsigned long mktime(const unsigned int year, 176 - const unsigned int mon, const unsigned int day, 177 - const unsigned int hour, const unsigned int min, 178 - const unsigned int sec) 179 - { 180 - return mktime64(year, mon, day, hour, min, sec); 181 - } 182 - 183 - static inline bool timeval_valid(const struct timeval *tv) 184 - { 185 - /* Dates before 1970 are bogus */ 186 - if (tv->tv_sec < 0) 187 - return false; 188 - 189 - /* Can't have more microseconds then a second */ 190 - if (tv->tv_usec < 0 || tv->tv_usec >= USEC_PER_SEC) 191 - return false; 192 - 193 - return true; 194 - } 195 - 196 - /** 197 - * timeval_to_ns - Convert timeval to nanoseconds 198 - * @ts: pointer to the timeval variable to be converted 199 - * 200 - * Returns the scalar nanosecond representation of the timeval 201 - * parameter. 202 - */ 203 - static inline s64 timeval_to_ns(const struct timeval *tv) 204 - { 205 - return ((s64) tv->tv_sec * NSEC_PER_SEC) + 206 - tv->tv_usec * NSEC_PER_USEC; 207 - } 208 - 209 - /** 210 - * ns_to_timeval - Convert nanoseconds to timeval 77 + * ns_to_kernel_old_timeval - Convert nanoseconds to timeval 211 78 * @nsec: the nanoseconds value to be converted 212 79 * 213 80 * Returns the timeval representation of the nsec parameter. 214 81 */ 215 - extern struct timeval ns_to_timeval(const s64 nsec); 216 82 extern struct __kernel_old_timeval ns_to_kernel_old_timeval(s64 nsec); 217 - 218 - /* 219 - * Old names for the 32-bit time_t interfaces, these will be removed 220 - * when everything uses the new names. 221 - */ 222 - #define compat_time_t old_time32_t 223 - #define compat_timeval old_timeval32 224 - #define compat_timespec old_timespec32 225 - #define compat_itimerspec old_itimerspec32 226 - #define ns_to_compat_timeval ns_to_old_timeval32 227 - #define get_compat_itimerspec64 get_old_itimerspec32 228 - #define put_compat_itimerspec64 put_old_itimerspec32 229 - #define compat_get_timespec64 get_old_timespec32 230 - #define compat_put_timespec64 put_old_timespec32 231 83 232 84 #endif
-32
include/linux/timekeeping32.h
··· 11 11 return ktime_get_real_seconds(); 12 12 } 13 13 14 - static inline void getnstimeofday(struct timespec *ts) 15 - { 16 - struct timespec64 ts64; 17 - 18 - ktime_get_real_ts64(&ts64); 19 - *ts = timespec64_to_timespec(ts64); 20 - } 21 - 22 - static inline void ktime_get_ts(struct timespec *ts) 23 - { 24 - struct timespec64 ts64; 25 - 26 - ktime_get_ts64(&ts64); 27 - *ts = timespec64_to_timespec(ts64); 28 - } 29 - 30 - static inline void getrawmonotonic(struct timespec *ts) 31 - { 32 - struct timespec64 ts64; 33 - 34 - ktime_get_raw_ts64(&ts64); 35 - *ts = timespec64_to_timespec(ts64); 36 - } 37 - 38 - static inline void getboottime(struct timespec *ts) 39 - { 40 - struct timespec64 ts64; 41 - 42 - getboottime64(&ts64); 43 - *ts = timespec64_to_timespec(ts64); 44 - } 45 - 46 14 #endif
-5
include/linux/types.h
··· 65 65 typedef __kernel_ptrdiff_t ptrdiff_t; 66 66 #endif 67 67 68 - #ifndef _TIME_T 69 - #define _TIME_T 70 - typedef __kernel_old_time_t time_t; 71 - #endif 72 - 73 68 #ifndef _CLOCK_T 74 69 #define _CLOCK_T 75 70 typedef __kernel_clock_t clock_t;
+2
include/uapi/asm-generic/posix_types.h
··· 87 87 typedef __kernel_long_t __kernel_off_t; 88 88 typedef long long __kernel_loff_t; 89 89 typedef __kernel_long_t __kernel_old_time_t; 90 + #ifndef __KERNEL__ 90 91 typedef __kernel_long_t __kernel_time_t; 92 + #endif 91 93 typedef long long __kernel_time64_t; 92 94 typedef __kernel_long_t __kernel_clock_t; 93 95 typedef int __kernel_timer_t;
+2 -2
include/uapi/linux/swab.h
··· 135 135 136 136 static __always_inline unsigned long __swab(const unsigned long y) 137 137 { 138 - #if BITS_PER_LONG == 64 138 + #if __BITS_PER_LONG == 64 139 139 return __swab64(y); 140 - #else /* BITS_PER_LONG == 32 */ 140 + #else /* __BITS_PER_LONG == 32 */ 141 141 return __swab32(y); 142 142 #endif 143 143 }
+12 -10
include/uapi/linux/time.h
··· 5 5 #include <linux/types.h> 6 6 #include <linux/time_types.h> 7 7 8 + #ifndef __KERNEL__ 8 9 #ifndef _STRUCT_TIMESPEC 9 10 #define _STRUCT_TIMESPEC 10 11 struct timespec { ··· 19 18 __kernel_suseconds_t tv_usec; /* microseconds */ 20 19 }; 21 20 21 + struct itimerspec { 22 + struct timespec it_interval;/* timer period */ 23 + struct timespec it_value; /* timer expiration */ 24 + }; 25 + 26 + struct itimerval { 27 + struct timeval it_interval;/* timer interval */ 28 + struct timeval it_value; /* current value */ 29 + }; 30 + #endif 31 + 22 32 struct timezone { 23 33 int tz_minuteswest; /* minutes west of Greenwich */ 24 34 int tz_dsttime; /* type of dst correction */ ··· 42 30 #define ITIMER_REAL 0 43 31 #define ITIMER_VIRTUAL 1 44 32 #define ITIMER_PROF 2 45 - 46 - struct itimerspec { 47 - struct timespec it_interval; /* timer period */ 48 - struct timespec it_value; /* timer expiration */ 49 - }; 50 - 51 - struct itimerval { 52 - struct timeval it_interval; /* timer interval */ 53 - struct timeval it_value; /* current value */ 54 - }; 55 33 56 34 /* 57 35 * The IDs of the various system clocks (for POSIX.1b interval timers):
+2 -4
ipc/sem.c
··· 2384 2384 ipc_assert_locked_object(&sma->sem_perm); 2385 2385 list_del(&un->list_id); 2386 2386 2387 - /* we are the last process using this ulp, acquiring ulp->lock 2388 - * isn't required. Besides that, we are also protected against 2389 - * IPC_RMID as we hold sma->sem_perm lock now 2390 - */ 2387 + spin_lock(&ulp->lock); 2391 2388 list_del_rcu(&un->list_proc); 2389 + spin_unlock(&ulp->lock); 2392 2390 2393 2391 /* perform adjustments registered in un */ 2394 2392 for (i = 0; i < sma->sem_nsems; i++) {
-64
kernel/compat.c
··· 26 26 27 27 #include <linux/uaccess.h> 28 28 29 - static int __compat_get_timeval(struct timeval *tv, const struct old_timeval32 __user *ctv) 30 - { 31 - return (!access_ok(ctv, sizeof(*ctv)) || 32 - __get_user(tv->tv_sec, &ctv->tv_sec) || 33 - __get_user(tv->tv_usec, &ctv->tv_usec)) ? -EFAULT : 0; 34 - } 35 - 36 - static int __compat_put_timeval(const struct timeval *tv, struct old_timeval32 __user *ctv) 37 - { 38 - return (!access_ok(ctv, sizeof(*ctv)) || 39 - __put_user(tv->tv_sec, &ctv->tv_sec) || 40 - __put_user(tv->tv_usec, &ctv->tv_usec)) ? -EFAULT : 0; 41 - } 42 - 43 - static int __compat_get_timespec(struct timespec *ts, const struct old_timespec32 __user *cts) 44 - { 45 - return (!access_ok(cts, sizeof(*cts)) || 46 - __get_user(ts->tv_sec, &cts->tv_sec) || 47 - __get_user(ts->tv_nsec, &cts->tv_nsec)) ? -EFAULT : 0; 48 - } 49 - 50 - static int __compat_put_timespec(const struct timespec *ts, struct old_timespec32 __user *cts) 51 - { 52 - return (!access_ok(cts, sizeof(*cts)) || 53 - __put_user(ts->tv_sec, &cts->tv_sec) || 54 - __put_user(ts->tv_nsec, &cts->tv_nsec)) ? -EFAULT : 0; 55 - } 56 - 57 - int compat_get_timeval(struct timeval *tv, const void __user *utv) 58 - { 59 - if (COMPAT_USE_64BIT_TIME) 60 - return copy_from_user(tv, utv, sizeof(*tv)) ? -EFAULT : 0; 61 - else 62 - return __compat_get_timeval(tv, utv); 63 - } 64 - EXPORT_SYMBOL_GPL(compat_get_timeval); 65 - 66 - int compat_put_timeval(const struct timeval *tv, void __user *utv) 67 - { 68 - if (COMPAT_USE_64BIT_TIME) 69 - return copy_to_user(utv, tv, sizeof(*tv)) ? -EFAULT : 0; 70 - else 71 - return __compat_put_timeval(tv, utv); 72 - } 73 - EXPORT_SYMBOL_GPL(compat_put_timeval); 74 - 75 - int compat_get_timespec(struct timespec *ts, const void __user *uts) 76 - { 77 - if (COMPAT_USE_64BIT_TIME) 78 - return copy_from_user(ts, uts, sizeof(*ts)) ? -EFAULT : 0; 79 - else 80 - return __compat_get_timespec(ts, uts); 81 - } 82 - EXPORT_SYMBOL_GPL(compat_get_timespec); 83 - 84 - int compat_put_timespec(const struct timespec *ts, void __user *uts) 85 - { 86 - if (COMPAT_USE_64BIT_TIME) 87 - return copy_to_user(uts, ts, sizeof(*ts)) ? -EFAULT : 0; 88 - else 89 - return __compat_put_timespec(ts, uts); 90 - } 91 - EXPORT_SYMBOL_GPL(compat_put_timespec); 92 - 93 29 #ifdef __ARCH_WANT_SYS_SIGPROCMASK 94 30 95 31 /*
-43
kernel/time/time.c
··· 449 449 } 450 450 EXPORT_SYMBOL(mktime64); 451 451 452 - /** 453 - * ns_to_timespec - Convert nanoseconds to timespec 454 - * @nsec: the nanoseconds value to be converted 455 - * 456 - * Returns the timespec representation of the nsec parameter. 457 - */ 458 - struct timespec ns_to_timespec(const s64 nsec) 459 - { 460 - struct timespec ts; 461 - s32 rem; 462 - 463 - if (!nsec) 464 - return (struct timespec) {0, 0}; 465 - 466 - ts.tv_sec = div_s64_rem(nsec, NSEC_PER_SEC, &rem); 467 - if (unlikely(rem < 0)) { 468 - ts.tv_sec--; 469 - rem += NSEC_PER_SEC; 470 - } 471 - ts.tv_nsec = rem; 472 - 473 - return ts; 474 - } 475 - EXPORT_SYMBOL(ns_to_timespec); 476 - 477 - /** 478 - * ns_to_timeval - Convert nanoseconds to timeval 479 - * @nsec: the nanoseconds value to be converted 480 - * 481 - * Returns the timeval representation of the nsec parameter. 482 - */ 483 - struct timeval ns_to_timeval(const s64 nsec) 484 - { 485 - struct timespec ts = ns_to_timespec(nsec); 486 - struct timeval tv; 487 - 488 - tv.tv_sec = ts.tv_sec; 489 - tv.tv_usec = (suseconds_t) ts.tv_nsec / 1000; 490 - 491 - return tv; 492 - } 493 - EXPORT_SYMBOL(ns_to_timeval); 494 - 495 452 struct __kernel_old_timeval ns_to_kernel_old_timeval(const s64 nsec) 496 453 { 497 454 struct timespec64 ts = ns_to_timespec64(nsec);
+6 -2
lib/stackdepot.c
··· 83 83 return true; 84 84 if (stack_slabs[depot_index] == NULL) { 85 85 stack_slabs[depot_index] = *prealloc; 86 + *prealloc = NULL; 86 87 } else { 87 - stack_slabs[depot_index + 1] = *prealloc; 88 + /* If this is the last depot slab, do not touch the next one. */ 89 + if (depot_index + 1 < STACK_ALLOC_MAX_SLABS) { 90 + stack_slabs[depot_index + 1] = *prealloc; 91 + *prealloc = NULL; 92 + } 88 93 /* 89 94 * This smp_store_release pairs with smp_load_acquire() from 90 95 * |next_slab_inited| above and in stack_depot_save(). 91 96 */ 92 97 smp_store_release(&next_slab_inited, 1); 93 98 } 94 - *prealloc = NULL; 95 99 return true; 96 100 } 97 101
+16
lib/string.c
··· 699 699 * @n: number of strings in the array or -1 for NULL terminated arrays 700 700 * @string: string to match with 701 701 * 702 + * This routine will look for a string in an array of strings up to the 703 + * n-th element in the array or until the first NULL element. 704 + * 705 + * Historically the value of -1 for @n, was used to search in arrays that 706 + * are NULL terminated. However, the function does not make a distinction 707 + * when finishing the search: either @n elements have been compared OR 708 + * the first NULL element was found. 709 + * 702 710 * Return: 703 711 * index of a @string in the @array if matches, or %-EINVAL otherwise. 704 712 */ ··· 735 727 * 736 728 * Returns index of @str in the @array or -EINVAL, just like match_string(). 737 729 * Uses sysfs_streq instead of strcmp for matching. 730 + * 731 + * This routine will look for a string in an array of strings up to the 732 + * n-th element in the array or until the first NULL element. 733 + * 734 + * Historically the value of -1 for @n, was used to search in arrays that 735 + * are NULL terminated. However, the function does not make a distinction 736 + * when finishing the search: either @n elements have been compared OR 737 + * the first NULL element was found. 738 738 */ 739 739 int __sysfs_match_string(const char * const *array, size_t n, const char *str) 740 740 {
+3 -1
mm/memcontrol.c
··· 409 409 if (mem_cgroup_is_root(memcg)) 410 410 continue; 411 411 ret = memcg_expand_one_shrinker_map(memcg, size, old_size); 412 - if (ret) 412 + if (ret) { 413 + mem_cgroup_iter_break(NULL, memcg); 413 414 goto unlock; 415 + } 414 416 } 415 417 unlock: 416 418 if (!ret)
+1 -1
mm/sparse.c
··· 876 876 * Poison uninitialized struct pages in order to catch invalid flags 877 877 * combinations. 878 878 */ 879 - page_init_poison(pfn_to_page(start_pfn), sizeof(struct page) * nr_pages); 879 + page_init_poison(memmap, sizeof(struct page) * nr_pages); 880 880 881 881 ms = __nr_to_section(section_nr); 882 882 set_section_nid(section_nr, nid);
+1 -1
mm/swapfile.c
··· 3157 3157 mapping = swap_file->f_mapping; 3158 3158 inode = mapping->host; 3159 3159 3160 - /* If S_ISREG(inode->i_mode) will do inode_lock(inode); */ 3160 + /* will take i_rwsem; */ 3161 3161 error = claim_swapfile(p, inode); 3162 3162 if (unlikely(error)) 3163 3163 goto bad_swap;
+6 -3
mm/vmscan.c
··· 2415 2415 /* 2416 2416 * Scan types proportional to swappiness and 2417 2417 * their relative recent reclaim efficiency. 2418 - * Make sure we don't miss the last page 2419 - * because of a round-off error. 2418 + * Make sure we don't miss the last page on 2419 + * the offlined memory cgroups because of a 2420 + * round-off error. 2420 2421 */ 2421 - scan = DIV64_U64_ROUND_UP(scan * fraction[file], 2422 + scan = mem_cgroup_online(memcg) ? 2423 + div64_u64(scan * fraction[file], denominator) : 2424 + DIV64_U64_ROUND_UP(scan * fraction[file], 2422 2425 denominator); 2423 2426 break; 2424 2427 case SCAN_FILE:
+4 -28
scripts/get_maintainer.pl
··· 932 932 } 933 933 } 934 934 935 - foreach my $fix (@fixes) { 936 - vcs_add_commit_signers($fix, "blamed_fixes"); 937 - } 938 - 939 935 foreach my $email (@email_to, @list_to) { 940 936 $email->[0] = deduplicate_email($email->[0]); 941 937 } ··· 968 972 push_email_address($tmp_email, ''); 969 973 add_role($tmp_email, 'in file'); 970 974 } 975 + } 976 + 977 + foreach my $fix (@fixes) { 978 + vcs_add_commit_signers($fix, "blamed_fixes"); 971 979 } 972 980 973 981 my @to = (); ··· 1341 1341 } 1342 1342 } 1343 1343 } elsif ($ptype eq "M") { 1344 - my ($name, $address) = parse_email($pvalue); 1345 - if ($name eq "") { 1346 - if ($i > 0) { 1347 - my $tv = $typevalue[$i - 1]; 1348 - if ($tv =~ m/^([A-Z]):\s*(.*)/) { 1349 - if ($1 eq "P") { 1350 - $name = $2; 1351 - $pvalue = format_email($name, $address, $email_usename); 1352 - } 1353 - } 1354 - } 1355 - } 1356 1344 if ($email_maintainer) { 1357 1345 my $role = get_maintainer_role($i); 1358 1346 push_email_addresses($pvalue, $role); 1359 1347 } 1360 1348 } elsif ($ptype eq "R") { 1361 - my ($name, $address) = parse_email($pvalue); 1362 - if ($name eq "") { 1363 - if ($i > 0) { 1364 - my $tv = $typevalue[$i - 1]; 1365 - if ($tv =~ m/^([A-Z]):\s*(.*)/) { 1366 - if ($1 eq "P") { 1367 - $name = $2; 1368 - $pvalue = format_email($name, $address, $email_usename); 1369 - } 1370 - } 1371 - } 1372 - } 1373 1349 if ($email_reviewer) { 1374 1350 my $subsystem = get_subsystem_name($i); 1375 1351 push_email_addresses($pvalue, "reviewer:$subsystem");
+33
tools/testing/selftests/vm/run_vmtests
··· 112 112 echo " https://github.com/libhugetlbfs/libhugetlbfs.git for" 113 113 echo " hugetlb regression testing." 114 114 115 + echo "---------------------------" 116 + echo "running map_fixed_noreplace" 117 + echo "---------------------------" 118 + ./map_fixed_noreplace 119 + if [ $? -ne 0 ]; then 120 + echo "[FAIL]" 121 + exitcode=1 122 + else 123 + echo "[PASS]" 124 + fi 125 + 115 126 echo "-------------------" 116 127 echo "running userfaultfd" 117 128 echo "-------------------" ··· 197 186 echo "[PASS]" 198 187 fi 199 188 189 + echo "-------------------------" 190 + echo "running mlock-random-test" 191 + echo "-------------------------" 192 + ./mlock-random-test 193 + if [ $? -ne 0 ]; then 194 + echo "[FAIL]" 195 + exitcode=1 196 + else 197 + echo "[PASS]" 198 + fi 199 + 200 200 echo "--------------------" 201 201 echo "running mlock2-tests" 202 202 echo "--------------------" 203 203 ./mlock2-tests 204 + if [ $? -ne 0 ]; then 205 + echo "[FAIL]" 206 + exitcode=1 207 + else 208 + echo "[PASS]" 209 + fi 210 + 211 + echo "-----------------" 212 + echo "running thuge-gen" 213 + echo "-----------------" 214 + ./thuge-gen 204 215 if [ $? -ne 0 ]; then 205 216 echo "[FAIL]" 206 217 exitcode=1