projects/linux·commit eb5699ba

Merge tag 'mm-nonmm-stable-2022-08-06-2' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

eb5699ba · Linus Torvalds <[email protected]> · 2022-08-07 10:03:24 -07:00

Pull misc updates from Andrew Morton:
 "Updates to various subsystems which I help look after. lib, ocfs2,
  fatfs, autofs, squashfs, procfs, etc. A relatively small amount of
  material this time"

* tag 'mm-nonmm-stable-2022-08-06-2' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: (72 commits)
  scripts/gdb: ensure the absolute path is generated on initial source
  MAINTAINERS: kunit: add David Gow as a maintainer of KUnit
  mailmap: add linux.dev alias for Brendan Higgins
  mailmap: update Kirill's email
  profile: setup_profiling_timer() is moslty not implemented
  ocfs2: fix a typo in a comment
  ocfs2: use the bitmap API to simplify code
  ocfs2: remove some useless functions
  lib/mpi: fix typo 'the the' in comment
  proc: add some (hopefully) insightful comments
  bdi: remove enum wb_congested_state
  kernel/hung_task: fix address space of proc_dohung_task_timeout_secs
  lib/lzo/lzo1x_compress.c: replace ternary operator with min() and min_t()
  squashfs: support reading fragments in readahead call
  squashfs: implement readahead
  squashfs: always build "file direct" version of page actor
  Revert "squashfs: provide backing_dev_info in order to disable read-ahead"
  fs/ocfs2: Fix spelling typo in comment
  ia64: old_rr4 added under CONFIG_HUGETLB_PAGE
  proc: fix test for "vsyscall=xonly" boot option
  ...
Commit
eb5699ba31558bdb2cee6ebde3d0a68091e47dce
Parents
b5a8466d · b9969558

Merge commit. Changes below are compared with the first parent: b5a8466d.

Changes

102 files changed · +1313 −724

FileStatusAddDelContent
.mailmapmodified+2−1View file
Documentation/admin-guide/kernel-parameters.txtmodified+13−0View file
MAINTAINERSmodified+2−0View file
arch/alpha/kernel/smp.cmodified+0−6View file
arch/arc/kernel/smp.cmodified+0−8View file
arch/arm/kernel/smp.cmodified+0−8View file
arch/arm64/kernel/smp.cmodified+0−8View file
arch/csky/kernel/smp.cmodified+0−5View file
arch/hexagon/kernel/smp.cmodified+0−5View file
arch/ia64/include/asm/mmu_context.hmodified+4−1View file
arch/ia64/include/uapi/asm/cmpxchg.hmodified+14−14View file
arch/ia64/kernel/smp.cmodified+0−6View file
arch/openrisc/kernel/smp.cmodified+0−6View file
arch/parisc/kernel/smp.cmodified+0−7View file
arch/powerpc/kernel/smp.cmodified+0−7View file
arch/riscv/kernel/smp.cmodified+0−6View file
arch/sparc/kernel/smp_32.cmodified+0−5View file
arch/sparc/kernel/smp_64.cmodified+0−6View file
arch/x86/include/asm/apic.hmodified+0−2View file
arch/x86/kernel/apic/apic.cmodified+0−5View file
arch/x86/kernel/cpu/cacheinfo.cmodified+6−0View file
arch/x86/kernel/smpboot.cmodified+0−4View file
fs/autofs/autofs_i.hmodified+5−2View file
fs/autofs/expire.cmodified+1−1View file
fs/autofs/inode.cmodified+1−0View file
fs/autofs/root.cmodified+50−58View file
fs/eventpoll.cmodified+22−0View file
fs/fat/namei_vfat.cmodified+192−39View file
fs/kernel_read_file.cmodified+19−19View file
fs/ocfs2/dlmfs/dlmfs.cmodified+11−3View file
fs/ocfs2/heartbeat.cmodified+5−22View file
fs/ocfs2/quota_global.cmodified+1−1View file
fs/proc/array.cmodified+4−1View file
fs/proc/base.cmodified+38−8View file
fs/proc/inode.cmodified+12−7View file
fs/proc/kmsg.cmodified+0−1View file
fs/proc/nommu.cmodified+0−1View file
fs/proc/proc_net.cmodified+6−3View file
fs/proc/proc_tty.cmodified+0−2View file
fs/proc/root.cmodified+5−3View file
fs/proc/vmcore.cmodified+0−1View file
fs/squashfs/Makefilemodified+2−2View file
fs/squashfs/block.cmodified+7−3View file
fs/squashfs/decompressor.hmodified+1−0View file
fs/squashfs/file.cmodified+132−1View file
fs/squashfs/file_direct.cmodified+20−70View file
fs/squashfs/lz4_wrapper.cmodified+5−2View file
fs/squashfs/lzo_wrapper.cmodified+5−2View file
fs/squashfs/page_actor.cmodified+47−8View file
fs/squashfs/page_actor.hmodified+13−44View file
fs/squashfs/super.cmodified+0−33View file
fs/squashfs/xz_wrapper.cmodified+10−1View file
fs/squashfs/zlib_wrapper.cmodified+11−1View file
fs/squashfs/zstd_wrapper.cmodified+11−1View file
include/linux/backing-dev-defs.hmodified+0−7View file
include/linux/compiler-gcc.hmodified+0−11View file
include/linux/cpumask.hmodified+27−81View file
include/linux/kernel_read_file.hmodified+16−16View file
include/linux/kfifo.hmodified+1−1View file
include/linux/limits.hmodified+1−0View file
include/linux/net.hmodified+0−2View file
include/linux/once.hmodified+0−2View file
include/linux/rbtree.hmodified+1−1View file
include/uapi/linux/swab.hmodified+3−3View file
init/version.cmodified+17−0View file
ipc/mqueue.cmodified+1−1View file
kernel/crash_core.cmodified+26−2View file
kernel/hung_task.cmodified+1−1View file
kernel/kallsyms.cmodified+1−22View file
kernel/kallsyms_internal.hadded+30−0View file
kernel/kexec_file.cmodified+7−3View file
kernel/profile.cmodified+13−2View file
lib/Kconfigmodified+0−9View file
lib/Kconfig.debugmodified+9−0View file
lib/Makefilemodified+2−2View file
lib/btree.cmodified+13−17View file
lib/cpumask.cmodified+2−0View file
lib/devres.cmodified+10−5View file
lib/error-inject.cmodified+12−16View file
lib/flex_proportions.cmodified+2−8View file
lib/list_debug.cmodified+10−2View file
lib/lru_cache.cmodified+2−2View file
lib/lz4/lz4_decompress.cmodified+3−3View file
lib/lzo/lzo1x_compress.cmodified+2−4View file
lib/mpi/mpiutil.cmodified+1−1View file
lib/radix-tree.cmodified+2−2View file
lib/scatterlist.cmodified+2−2View file
lib/smp_processor_id.cmodified+1−1View file
lib/stackdepot.cmodified+49−10View file
lib/test_cpumask.cadded+138−0View file
lib/ts_bm.cmodified+1−1View file
scripts/bloat-o-metermodified+27−20View file
scripts/checkpatch.plmodified+3−2View file
scripts/gdb/vmlinux-gdb.pymodified+1−1View file
tools/accounting/getdelays.cmodified+0−4View file
tools/testing/selftests/Makefilemodified+1−0View file
tools/testing/selftests/filesystems/fat/.gitignoreadded+2−0View file
tools/testing/selftests/filesystems/fat/Makefileadded+7−0View file
tools/testing/selftests/filesystems/fat/configadded+2−0View file
tools/testing/selftests/filesystems/fat/rename_exchange.cadded+37−0View file
tools/testing/selftests/filesystems/fat/run_fat_tests.shadded+82−0View file
tools/testing/selftests/proc/proc-pid-vm.cmodified+68−7View file

Only the first 600 diff lines are shown. Download the complete patch.

.mailmap

View file
diff --git a/.mailmap b/.mailmap
index 71577c3..38255d4 100644
--- a/.mailmap
+++ b/.mailmap
@@ -78,6 +78,7 @@ Boris Brezillon <[email protected]> <[email protected]>
Brian Avery <[email protected]>
Brian King <[email protected]>
@@ -230,7 +231,7 @@ Kees Cook <[email protected]> <[email protected]>
Kenneth W Chen <[email protected]>
Konstantin Khlebnikov <[email protected]> <[email protected]>
Konstantin Khlebnikov <[email protected]> <[email protected]>

Documentation/admin-guide/kernel-parameters.txt

View file
diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
index f251f5c..bab2b0b 100644
--- a/Documentation/admin-guide/kernel-parameters.txt
+++ b/Documentation/admin-guide/kernel-parameters.txt
@@ -1673,6 +1673,19 @@
hlt [BUGS=ARM,SH]
+ hostname= [KNL] Set the hostname (aka UTS nodename).
+ Format: <string>
+ This allows setting the system's hostname during early
+ startup. This sets the name returned by gethostname.
+ Using this parameter to set the hostname makes it
+ possible to ensure the hostname is correctly set before
+ any userspace processes run, avoiding the possibility
+ that a process may call gethostname before the hostname
+ has been explicitly set, resulting in the calling
+ process getting an incorrect result. The string must
+ not exceed the maximum allowed hostname length (usually
+ 64 characters) and will be truncated otherwise.
+
hpet= [X86-32,HPET] option to control HPET usage
Format: { enable (default) | disable | force |
verbose }

MAINTAINERS

View file
diff --git a/MAINTAINERS b/MAINTAINERS
index 5a6e532..b4d96ed 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -11065,6 +11065,7 @@ F: fs/smbfs_common/
KERNEL UNIT TESTING FRAMEWORK (KUnit)
M: Brendan Higgins <[email protected]>
+M: David Gow <[email protected]>
S: Maintained
@@ -21277,6 +21278,7 @@ M: OGAWA Hirofumi <[email protected]>
S: Maintained
F: Documentation/filesystems/vfat.rst
F: fs/fat/
+F: tools/testing/selftests/filesystems/fat/
VFIO DRIVER
M: Alex Williamson <[email protected]>

arch/alpha/kernel/smp.c

View file
diff --git a/arch/alpha/kernel/smp.c b/arch/alpha/kernel/smp.c
index cb64e47..f4e20f7 100644
--- a/arch/alpha/kernel/smp.c
+++ b/arch/alpha/kernel/smp.c
@@ -497,12 +497,6 @@ smp_cpus_done(unsigned int max_cpus)
((bogosum + 2500) / (5000/HZ)) % 100);
}
-int
-setup_profiling_timer(unsigned int multiplier)
-{
- return -EINVAL;
-}
-
static void
send_ipi_message(const struct cpumask *to_whom, enum ipi_message_type operation)
{

arch/arc/kernel/smp.c

View file
diff --git a/arch/arc/kernel/smp.c b/arch/arc/kernel/smp.c
index d947473..ab9e75e 100644
--- a/arch/arc/kernel/smp.c
+++ b/arch/arc/kernel/smp.c
@@ -232,14 +232,6 @@ int __cpu_up(unsigned int cpu, struct task_struct *idle)
return 0;
}
-/*
- * not supported here
- */
-int setup_profiling_timer(unsigned int multiplier)
-{
- return -EINVAL;
-}
-
/*****************************************************************************/
/* Inter Processor Interrupt Handling */
/*****************************************************************************/

arch/arm/kernel/smp.c

View file
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c
index 73fc645..978db2d 100644
--- a/arch/arm/kernel/smp.c
+++ b/arch/arm/kernel/smp.c
@@ -787,14 +787,6 @@ void panic_smp_self_stop(void)
cpu_relax();
}
-/*
- * not supported here
- */
-int setup_profiling_timer(unsigned int multiplier)
-{
- return -EINVAL;
-}
-
#ifdef CONFIG_CPU_FREQ
static DEFINE_PER_CPU(unsigned long, l_p_j_ref);

arch/arm64/kernel/smp.c

View file
diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c
index 62ed361..ffc5d76 100644
--- a/arch/arm64/kernel/smp.c
+++ b/arch/arm64/kernel/smp.c
@@ -1078,14 +1078,6 @@ bool smp_crash_stop_failed(void)
}
#endif
-/*
- * not supported here
- */
-int setup_profiling_timer(unsigned int multiplier)
-{
- return -EINVAL;
-}
-
static bool have_cpu_die(void)
{
#ifdef CONFIG_HOTPLUG_CPU

arch/csky/kernel/smp.c

View file
diff --git a/arch/csky/kernel/smp.c b/arch/csky/kernel/smp.c
index 6bb38bc..4b605aa 100644
--- a/arch/csky/kernel/smp.c
+++ b/arch/csky/kernel/smp.c
@@ -243,11 +243,6 @@ void __init smp_cpus_done(unsigned int max_cpus)
{
}
-int setup_profiling_timer(unsigned int multiplier)
-{
- return -EINVAL;
-}
-
void csky_start_secondary(void)
{
struct mm_struct *mm = &init_mm;

arch/hexagon/kernel/smp.c

View file
diff --git a/arch/hexagon/kernel/smp.c b/arch/hexagon/kernel/smp.c
index 619c564..4ba93e5 100644
--- a/arch/hexagon/kernel/smp.c
+++ b/arch/hexagon/kernel/smp.c
@@ -240,11 +240,6 @@ void arch_send_call_function_ipi_mask(const struct cpumask *mask)
send_ipi(mask, IPI_CALL_FUNC);
}
-int setup_profiling_timer(unsigned int multiplier)
-{
- return -EINVAL;
-}
-
void smp_start_cpus(void)
{
int i;

arch/ia64/include/asm/mmu_context.h

View file
diff --git a/arch/ia64/include/asm/mmu_context.h b/arch/ia64/include/asm/mmu_context.h
index 87a0d5b..06257e3 100644
--- a/arch/ia64/include/asm/mmu_context.h
+++ b/arch/ia64/include/asm/mmu_context.h
@@ -124,9 +124,12 @@ reload_context (nv_mm_context_t context)
{
unsigned long rid;
unsigned long rid_incr = 0;
- unsigned long rr0, rr1, rr2, rr3, rr4, old_rr4;
+ unsigned long rr0, rr1, rr2, rr3, rr4;
+#ifdef CONFIG_HUGETLB_PAGE
+ unsigned long old_rr4;
old_rr4 = ia64_get_rr(RGN_BASE(RGN_HPAGE));
+#endif
rid = context << 3; /* make space for encoding the region number */
rid_incr = 1 << 8;

arch/ia64/include/uapi/asm/cmpxchg.h

View file
diff --git a/arch/ia64/include/uapi/asm/cmpxchg.h b/arch/ia64/include/uapi/asm/cmpxchg.h
index 2c2f3cf..ca2e026 100644
--- a/arch/ia64/include/uapi/asm/cmpxchg.h
+++ b/arch/ia64/include/uapi/asm/cmpxchg.h
@@ -33,24 +33,24 @@ extern void ia64_xchg_called_with_bad_pointer(void);
\
switch (size) { \
case 1: \
- __xchg_result = ia64_xchg1((__u8 *)ptr, x); \
+ __xchg_result = ia64_xchg1((__u8 __force *)ptr, x); \
break; \
\
case 2: \
- __xchg_result = ia64_xchg2((__u16 *)ptr, x); \
+ __xchg_result = ia64_xchg2((__u16 __force *)ptr, x); \
break; \
\
case 4: \
- __xchg_result = ia64_xchg4((__u32 *)ptr, x); \
+ __xchg_result = ia64_xchg4((__u32 __force *)ptr, x); \
break; \
\
case 8: \
- __xchg_result = ia64_xchg8((__u64 *)ptr, x); \
+ __xchg_result = ia64_xchg8((__u64 __force *)ptr, x); \
break; \
default: \
ia64_xchg_called_with_bad_pointer(); \
} \
- __xchg_result; \
+ (__typeof__ (*(ptr)) __force) __xchg_result; \
})
#ifndef __KERNEL__
@@ -76,42 +76,42 @@ extern long ia64_cmpxchg_called_with_bad_pointer(void);
\
switch (size) { \
case 1: \
- _o_ = (__u8) (long) (old); \
+ _o_ = (__u8) (long __force) (old); \
break; \
case 2: \
- _o_ = (__u16) (long) (old); \
+ _o_ = (__u16) (long __force) (old); \
break; \
case 4: \
- _o_ = (__u32) (long) (old); \
+ _o_ = (__u32) (long __force) (old); \
break; \
case 8: \
- _o_ = (__u64) (long) (old); \
+ _o_ = (__u64) (long __force) (old); \
break; \
default: \
break; \
} \
switch (size) { \
case 1: \
- _r_ = ia64_cmpxchg1_##sem((__u8 *) ptr, new, _o_); \
+ _r_ = ia64_cmpxchg1_##sem((__u8 __force *) ptr, new, _o_); \
break; \
\
case 2: \
- _r_ = ia64_cmpxchg2_##sem((__u16 *) ptr, new, _o_); \
+ _r_ = ia64_cmpxchg2_##sem((__u16 __force *) ptr, new, _o_); \
break; \
\
case 4: \
- _r_ = ia64_cmpxchg4_##sem((__u32 *) ptr, new, _o_); \
+ _r_ = ia64_cmpxchg4_##sem((__u32 __force *) ptr, new, _o_); \
break; \
\
case 8: \
- _r_ = ia64_cmpxchg8_##sem((__u64 *) ptr, new, _o_); \
+ _r_ = ia64_cmpxchg8_##sem((__u64 __force *) ptr, new, _o_); \
break; \
\
default: \
_r_ = ia64_cmpxchg_called_with_bad_pointer(); \
break; \
} \
- (__typeof__(old)) _r_; \
+ (__typeof__(old) __force) _r_; \
})
#define cmpxchg_acq(ptr, o, n) \

arch/ia64/kernel/smp.c

View file
diff --git a/arch/ia64/kernel/smp.c b/arch/ia64/kernel/smp.c
index 7b7b64e..e2cc59d 100644
--- a/arch/ia64/kernel/smp.c
+++ b/arch/ia64/kernel/smp.c
@@ -333,9 +333,3 @@ smp_send_stop (void)
{
send_IPI_allbutself(IPI_CPU_STOP);
}
-
-int
-setup_profiling_timer (unsigned int multiplier)
-{
- return -EINVAL;
-}

arch/openrisc/kernel/smp.c

View file
diff --git a/arch/openrisc/kernel/smp.c b/arch/openrisc/kernel/smp.c
index 27041db..e141909 100644
--- a/arch/openrisc/kernel/smp.c
+++ b/arch/openrisc/kernel/smp.c
@@ -197,12 +197,6 @@ void smp_send_stop(void)
smp_call_function(stop_this_cpu, NULL, 0);
}
-/* not supported, yet */
-int setup_profiling_timer(unsigned int multiplier)
-{
- return -EINVAL;
-}
-
void __init set_smp_cross_call(void (*fn)(const struct cpumask *, unsigned int))
{
smp_cross_call = fn;

arch/parisc/kernel/smp.c

View file
diff --git a/arch/parisc/kernel/smp.c b/arch/parisc/kernel/smp.c
index 24d0744..7dbd92c 100644
--- a/arch/parisc/kernel/smp.c
+++ b/arch/parisc/kernel/smp.c
@@ -513,10 +513,3 @@ void __cpu_die(unsigned int cpu)
pdc_cpu_rendezvous_unlock();
}
-
-#ifdef CONFIG_PROC_FS
-int setup_profiling_timer(unsigned int multiplier)
-{
- return -EINVAL;
-}
-#endif

arch/powerpc/kernel/smp.c

View file
diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c
index 6b850c1..169703f 100644
--- a/arch/powerpc/kernel/smp.c
+++ b/arch/powerpc/kernel/smp.c
@@ -1663,13 +1663,6 @@ void start_secondary(void *unused)
BUG();
}
-#ifdef CONFIG_PROFILING
-int setup_profiling_timer(unsigned int multiplier)
-{
- return 0;
-}
-#endif
-
static void __init fixup_topology(void)
{
int i;

arch/riscv/kernel/smp.c

View file
diff --git a/arch/riscv/kernel/smp.c b/arch/riscv/kernel/smp.c
index 018e7dc..760a645 100644
--- a/arch/riscv/kernel/smp.c
+++ b/arch/riscv/kernel/smp.c
@@ -64,12 +64,6 @@ bool arch_match_cpu_phys_id(int cpu, u64 phys_id)
return phys_id == cpuid_to_hartid_map(cpu);
}
-/* Unsupported */
-int setup_profiling_timer(unsigned int multiplier)
-{
- return -EINVAL;
-}
-
static void ipi_stop(void)
{
set_cpu_online(smp_processor_id(), false);

arch/sparc/kernel/smp_32.c

View file
diff --git a/arch/sparc/kernel/smp_32.c b/arch/sparc/kernel/smp_32.c
index 22b148e..ad8094d 100644
--- a/arch/sparc/kernel/smp_32.c
+++ b/arch/sparc/kernel/smp_32.c
@@ -174,11 +174,6 @@ void smp_call_function_interrupt(void)
irq_exit();
}
-int setup_profiling_timer(unsigned int multiplier)
-{
- return -EINVAL;
-}
-
void __init smp_prepare_cpus(unsigned int max_cpus)
{
int i, cpuid, extra;

arch/sparc/kernel/smp_64.c

View file
diff --git a/arch/sparc/kernel/smp_64.c b/arch/sparc/kernel/smp_64.c
index a1f78e9..a55295d 100644
--- a/arch/sparc/kernel/smp_64.c
+++ b/arch/sparc/kernel/smp_64.c
@@ -1186,12 +1186,6 @@ void __irq_entry smp_penguin_jailcell(int irq, struct pt_regs *regs)
preempt_enable();
}
-/* /proc/profile writes can call this, don't __init it please. */
-int setup_profiling_timer(unsigned int multiplier)
-{
- return -EINVAL;
-}
-
void __init smp_prepare_cpus(unsigned int max_cpus)
{
}

arch/x86/include/asm/apic.h

View file
diff --git a/arch/x86/include/asm/apic.h b/arch/x86/include/asm/apic.h
index bd8ae0a..3415321 100644
--- a/arch/x86/include/asm/apic.h
+++ b/arch/x86/include/asm/apic.h
@@ -98,8 +98,6 @@ static inline bool apic_from_smp_config(void)
#include <asm/paravirt.h>
#endif
-extern int setup_profiling_timer(unsigned int);
-
static inline void native_apic_mem_write(u32 reg, u32 v)
{
volatile u32 *addr = (volatile u32 *)(APIC_BASE + reg);

arch/x86/kernel/apic/apic.c

View file
diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
index a434760..6d303d1 100644
--- a/arch/x86/kernel/apic/apic.c
+++ b/arch/x86/kernel/apic/apic.c
@@ -1115,11 +1115,6 @@ DEFINE_IDTENTRY_SYSVEC(sysvec_apic_timer_interrupt)
set_irq_regs(old_regs);
}
-int setup_profiling_timer(unsigned int multiplier)
-{
- return -EINVAL;
-}
-
/*
* Local APIC start and shutdown
*/

arch/x86/kernel/cpu/cacheinfo.c

View file
diff --git a/arch/x86/kernel/cpu/cacheinfo.c b/arch/x86/kernel/cpu/cacheinfo.c
index fe98a14..6655683 100644
--- a/arch/x86/kernel/cpu/cacheinfo.c
+++ b/arch/x86/kernel/cpu/cacheinfo.c
@@ -29,6 +29,12 @@
#define LVL_3 4
#define LVL_TRACE 5
+/* Shared last level cache maps */
+DEFINE_PER_CPU_READ_MOSTLY(cpumask_var_t, cpu_llc_shared_map);
+
+/* Shared L2 cache maps */
+DEFINE_PER_CPU_READ_MOSTLY(cpumask_var_t, cpu_l2c_shared_map);
+
struct _cache_table {
unsigned char descriptor;
char cache_type;

arch/x86/kernel/smpboot.c

View file
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index 5e7f953..f24227b 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -95,10 +95,6 @@ EXPORT_PER_CPU_SYMBOL(cpu_core_map);
DEFINE_PER_CPU_READ_MOSTLY(cpumask_var_t, cpu_die_map);
EXPORT_PER_CPU_SYMBOL(cpu_die_map);
-DEFINE_PER_CPU_READ_MOSTLY(cpumask_var_t, cpu_llc_shared_map);
-
-DEFINE_PER_CPU_READ_MOSTLY(cpumask_var_t, cpu_l2c_shared_map);
-
/* Per CPU bogomips and other parameters */
DEFINE_PER_CPU_READ_MOSTLY(struct cpuinfo_x86, cpu_info);
EXPORT_PER_CPU_SYMBOL(cpu_info);

fs/autofs/autofs_i.h

View file
diff --git a/fs/autofs/autofs_i.h b/fs/autofs/autofs_i.h
index 918826e..d5a44fa 100644
--- a/fs/autofs/autofs_i.h
+++ b/fs/autofs/autofs_i.h
@@ -51,8 +51,6 @@ extern struct file_system_type autofs_fs_type;
*/
struct autofs_info {
struct dentry *dentry;
- struct inode *inode;
-
int flags;
struct completion expire_complete;
@@ -148,6 +146,11 @@ static inline int autofs_oz_mode(struct autofs_sb_info *sbi)
task_pgrp(current) == sbi->oz_pgrp);
}
+static inline bool autofs_empty(struct autofs_info *ino)
+{
+ return ino->count < 2;
+}
+
struct inode *autofs_get_inode(struct super_block *, umode_t);
void autofs_free_ino(struct autofs_info *);

fs/autofs/expire.c

View file
diff --git a/fs/autofs/expire.c b/fs/autofs/expire.c
index b3fefd6..038b3d2 100644
--- a/fs/autofs/expire.c
+++ b/fs/autofs/expire.c
@@ -371,7 +371,7 @@ static struct dentry *should_expire(struct dentry *dentry,
return NULL;
}
- if (simple_empty(dentry))
+ if (autofs_empty(ino))
return NULL;
/* Case 2: tree mount, expire iff entire tree is not busy */

fs/autofs/inode.c

View file
diff --git a/fs/autofs/inode.c b/fs/autofs/inode.c
index 9edf243..affa703 100644
--- a/fs/autofs/inode.c
+++ b/fs/autofs/inode.c
@@ -20,6 +20,7 @@ struct autofs_info *autofs_new_ino(struct autofs_sb_info *sbi)
INIT_LIST_HEAD(&ino->expiring);
ino->last_used = jiffies;
ino->sbi = sbi;
+ ino->count = 1;
}
return ino;
}

fs/autofs/root.c

View file
diff --git a/fs/autofs/root.c b/fs/autofs/root.c
index 91fe454..ca03c1c 100644
--- a/fs/autofs/root.c
+++ b/fs/autofs/root.c
@@ -10,6 +10,7 @@
#include "autofs_i.h"
+static int autofs_dir_permission(struct user_namespace *, struct inode *, int);
static int autofs_dir_symlink(struct user_namespace *, struct inode *,
struct dentry *, const char *);
static int autofs_dir_unlink(struct inode *, struct dentry *);
@@ -50,6 +51,7 @@ const struct file_operations autofs_dir_operations = {
const struct inode_operations autofs_dir_inode_operations = {
.lookup = autofs_lookup,
+ .permission = autofs_dir_permission,
.unlink = autofs_dir_unlink,
.symlink = autofs_dir_symlink,
.mkdir = autofs_dir_mkdir,
@@ -77,6 +79,7 @@ static int autofs_dir_open(struct inode *inode, struct file *file)
{
struct dentry *dentry = file->f_path.dentry;
struct autofs_sb_info *sbi = autofs_sbi(dentry->d_sb);
+ struct autofs_info *ino = autofs_dentry_ino(dentry);
pr_debug("file=%p dentry=%p %pd\n", file, dentry, dentry);
@@ -93,7 +96,7 @@ static int autofs_dir_open(struct inode *inode, struct file *file)
* it.
*/
spin_lock(&sbi->lookup_lock);
- if (!path_is_mountpoint(&file->f_path) && simple_empty(dentry)) {
+ if (!path_is_mountpoint(&file->f_path) && autofs_empty(ino)) {
spin_unlock(&sbi->lookup_lock);
return -ENOENT;
}
@@ -288,9 +291,26 @@ static struct dentry *autofs_mountpoint_changed(struct path *path)
struct dentry *dentry = path->dentry;
struct autofs_sb_info *sbi = autofs_sbi(dentry->d_sb);
- /*
- * If this is an indirect mount the dentry could have gone away
- * as a result of an expire and a new one created.
+ /* If this is an indirect mount the dentry could have gone away
+ * and a new one created.
+ *
+ * This is unusual and I can't remember the case for which it
+ * was originally added now. But an example of how this can
+ * happen is an autofs indirect mount that has the "browse"
+ * option set and also has the "symlink" option in the autofs
+ * map entry. In this case the daemon will remove the browse
+ * directory and create a symlink as the mount leaving the
+ * struct path stale.
+ *
+ * Another not so obvious case is when a mount in an autofs
+ * indirect mount that uses the "nobrowse" option is being
+ * expired at the same time as a path walk. If the mount has
+ * been umounted but the mount point directory seen before
+ * becoming unhashed (during a lockless path walk) when a stat
+ * family system call is made the mount won't be re-mounted as
+ * it should. In this case the mount point that's been removed
+ * (by the daemon) will be stale and the a new mount point
+ * dentry created.
*/
if (autofs_type_indirect(sbi->type) && d_unhashed(dentry)) {
struct dentry *parent = dentry->d_parent;
@@ -362,7 +382,7 @@ static struct vfsmount *autofs_d_automount(struct path *path)
* the mount never trigger mounts themselves (they have an
* autofs trigger mount mounted on them). But v4 pseudo direct
* mounts do need the leaves to trigger mounts. In this case
- * we have no choice but to use the list_empty() check and
+ * we have no choice but to use the autofs_empty() check and
* require user space behave.
*/
if (sbi->version > 4) {
@@ -371,7 +391,7 @@ static struct vfsmount *autofs_d_automount(struct path *path)
goto done;
}
} else {
- if (!simple_empty(dentry)) {
+ if (!autofs_empty(ino)) {
spin_unlock(&sbi->fs_lock);
goto done;
}
@@ -426,9 +446,8 @@ static int autofs_d_manage(const struct path *path, bool rcu_walk)
if (rcu_walk) {
/* We don't need fs_lock in rcu_walk mode,
- * just testing 'AUTOFS_INFO_NO_RCU' is enough.
- * simple_empty() takes a spinlock, so leave it
- * to last.
+ * just testing 'AUTOFS_INF_WANT_EXPIRE' is enough.
+ *
* We only return -EISDIR when certain this isn't
* a mount-trap.
*/
@@ -441,9 +460,7 @@ static int autofs_d_manage(const struct path *path, bool rcu_walk)
inode = d_inode_rcu(dentry);
if (inode && S_ISLNK(inode->i_mode))

This diff is incomplete. Download the complete patch.

fs/eventpoll.c

View file

This diff is incomplete. Download the complete patch.

fs/fat/namei_vfat.c

View file

This diff is incomplete. Download the complete patch.

fs/kernel_read_file.c

View file

This diff is incomplete. Download the complete patch.

fs/ocfs2/dlmfs/dlmfs.c

View file

This diff is incomplete. Download the complete patch.

fs/ocfs2/heartbeat.c

View file

This diff is incomplete. Download the complete patch.

fs/ocfs2/quota_global.c

View file

This diff is incomplete. Download the complete patch.

fs/proc/array.c

View file

This diff is incomplete. Download the complete patch.

fs/proc/base.c

View file

This diff is incomplete. Download the complete patch.

fs/proc/inode.c

View file

This diff is incomplete. Download the complete patch.

fs/proc/kmsg.c

View file

This diff is incomplete. Download the complete patch.

fs/proc/nommu.c

View file

This diff is incomplete. Download the complete patch.

fs/proc/proc_net.c

View file

This diff is incomplete. Download the complete patch.

fs/proc/proc_tty.c

View file

This diff is incomplete. Download the complete patch.

fs/proc/root.c

View file

This diff is incomplete. Download the complete patch.

fs/proc/vmcore.c

View file

This diff is incomplete. Download the complete patch.

fs/squashfs/Makefile

View file

This diff is incomplete. Download the complete patch.

fs/squashfs/block.c

View file

This diff is incomplete. Download the complete patch.

fs/squashfs/decompressor.h

View file

This diff is incomplete. Download the complete patch.

fs/squashfs/file.c

View file

This diff is incomplete. Download the complete patch.

fs/squashfs/file_direct.c

View file

This diff is incomplete. Download the complete patch.

fs/squashfs/lz4_wrapper.c

View file

This diff is incomplete. Download the complete patch.

fs/squashfs/lzo_wrapper.c

View file

This diff is incomplete. Download the complete patch.

fs/squashfs/page_actor.c

View file

This diff is incomplete. Download the complete patch.

fs/squashfs/page_actor.h

View file

This diff is incomplete. Download the complete patch.

fs/squashfs/super.c

View file

This diff is incomplete. Download the complete patch.

fs/squashfs/xz_wrapper.c

View file

This diff is incomplete. Download the complete patch.

fs/squashfs/zlib_wrapper.c

View file

This diff is incomplete. Download the complete patch.

fs/squashfs/zstd_wrapper.c

View file

This diff is incomplete. Download the complete patch.

include/linux/backing-dev-defs.h

View file

This diff is incomplete. Download the complete patch.

include/linux/compiler-gcc.h

View file

This diff is incomplete. Download the complete patch.

include/linux/cpumask.h

View file

This diff is incomplete. Download the complete patch.

include/linux/kernel_read_file.h

View file

This diff is incomplete. Download the complete patch.

include/linux/kfifo.h

View file

This diff is incomplete. Download the complete patch.

include/linux/limits.h

View file

This diff is incomplete. Download the complete patch.

include/linux/net.h

View file

This diff is incomplete. Download the complete patch.

include/linux/once.h

View file

This diff is incomplete. Download the complete patch.

include/linux/rbtree.h

View file

This diff is incomplete. Download the complete patch.

include/uapi/linux/swab.h

View file

This diff is incomplete. Download the complete patch.

init/version.c

View file

This diff is incomplete. Download the complete patch.

ipc/mqueue.c

View file

This diff is incomplete. Download the complete patch.

kernel/crash_core.c

View file

This diff is incomplete. Download the complete patch.

kernel/hung_task.c

View file

This diff is incomplete. Download the complete patch.

kernel/kallsyms.c

View file

This diff is incomplete. Download the complete patch.

kernel/kallsyms_internal.h

View file

This diff is incomplete. Download the complete patch.

kernel/kexec_file.c

View file

This diff is incomplete. Download the complete patch.

kernel/profile.c

View file

This diff is incomplete. Download the complete patch.

lib/Kconfig

View file

This diff is incomplete. Download the complete patch.

lib/Kconfig.debug

View file

This diff is incomplete. Download the complete patch.

lib/Makefile

View file

This diff is incomplete. Download the complete patch.

lib/btree.c

View file

This diff is incomplete. Download the complete patch.

lib/cpumask.c

View file

This diff is incomplete. Download the complete patch.

lib/devres.c

View file

This diff is incomplete. Download the complete patch.

lib/error-inject.c

View file

This diff is incomplete. Download the complete patch.

lib/flex_proportions.c

View file

This diff is incomplete. Download the complete patch.

lib/list_debug.c

View file

This diff is incomplete. Download the complete patch.

lib/lru_cache.c

View file

This diff is incomplete. Download the complete patch.

lib/lz4/lz4_decompress.c

View file

This diff is incomplete. Download the complete patch.

lib/lzo/lzo1x_compress.c

View file

This diff is incomplete. Download the complete patch.

lib/mpi/mpiutil.c

View file

This diff is incomplete. Download the complete patch.

lib/radix-tree.c

View file

This diff is incomplete. Download the complete patch.

lib/scatterlist.c

View file

This diff is incomplete. Download the complete patch.

lib/smp_processor_id.c

View file

This diff is incomplete. Download the complete patch.

lib/stackdepot.c

View file

This diff is incomplete. Download the complete patch.

lib/test_cpumask.c

View file

This diff is incomplete. Download the complete patch.

lib/ts_bm.c

View file

This diff is incomplete. Download the complete patch.

scripts/bloat-o-meter

View file

This diff is incomplete. Download the complete patch.

scripts/checkpatch.pl

View file

This diff is incomplete. Download the complete patch.

scripts/gdb/vmlinux-gdb.py

View file

This diff is incomplete. Download the complete patch.

tools/accounting/getdelays.c

View file

This diff is incomplete. Download the complete patch.

tools/testing/selftests/Makefile

View file

This diff is incomplete. Download the complete patch.

tools/testing/selftests/filesystems/fat/.gitignore

View file

This diff is incomplete. Download the complete patch.

tools/testing/selftests/filesystems/fat/Makefile

View file

This diff is incomplete. Download the complete patch.

tools/testing/selftests/filesystems/fat/config

View file

This diff is incomplete. Download the complete patch.

tools/testing/selftests/filesystems/fat/rename_exchange.c

View file

This diff is incomplete. Download the complete patch.

tools/testing/selftests/filesystems/fat/run_fat_tests.sh

View file

This diff is incomplete. Download the complete patch.

tools/testing/selftests/proc/proc-pid-vm.c

View file

This diff is incomplete. Download the complete patch.