Skip to content

Commit 0c272a1

Browse files
committed
Merge tag 'mm-hotfixes-stable-2023-02-02-19-24-2' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Pull misc fixes from Andrew Morton: "25 hotfixes, mainly for MM. 13 are cc:stable" * tag 'mm-hotfixes-stable-2023-02-02-19-24-2' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: (26 commits) mm: memcg: fix NULL pointer in mem_cgroup_track_foreign_dirty_slowpath() Kconfig.debug: fix the help description in SCHED_DEBUG mm/swapfile: add cond_resched() in get_swap_pages() mm: use stack_depot_early_init for kmemleak Squashfs: fix handling and sanity checking of xattr_ids count sh: define RUNTIME_DISCARD_EXIT highmem: round down the address passed to kunmap_flush_on_unmap() migrate: hugetlb: check for hugetlb shared PMD in node migration mm: hugetlb: proc: check for hugetlb shared PMD in /proc/PID/smaps mm/MADV_COLLAPSE: catch !none !huge !bad pmd lookups Revert "mm: kmemleak: alloc gray object for reserved region with direct map" freevxfs: Kconfig: fix spelling maple_tree: should get pivots boundary by type .mailmap: update e-mail address for Eugen Hristev mm, mremap: fix mremap() expanding for vma's with vm_ops->close() squashfs: harden sanity check in squashfs_read_xattr_id_table ia64: fix build error due to switch case label appearing next to declaration mm: multi-gen LRU: fix crash during cgroup migration Revert "mm: add nodes= arg to memory.reclaim" zsmalloc: fix a race with deferred_handles storing ...
2 parents 66a87ff + ac86f54 commit 0c272a1

File tree

31 files changed

+430
-152
lines changed

31 files changed

+430
-152
lines changed

.mailmap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ Domen Puncer <[email protected]>
130130
Douglas Gilbert <[email protected]>
131131
Ed L. Cashin <[email protected]>
132132
133+
133134
Evgeniy Polyakov <[email protected]>
134135
135136
Felipe W Damasio <[email protected]>

Documentation/admin-guide/cgroup-v2.rst

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1245,13 +1245,17 @@ PAGE_SIZE multiple when read back.
12451245
This is a simple interface to trigger memory reclaim in the
12461246
target cgroup.
12471247

1248-
This file accepts a string which contains the number of bytes to
1249-
reclaim.
1248+
This file accepts a single key, the number of bytes to reclaim.
1249+
No nested keys are currently supported.
12501250

12511251
Example::
12521252

12531253
echo "1G" > memory.reclaim
12541254

1255+
The interface can be later extended with nested keys to
1256+
configure the reclaim behavior. For example, specify the
1257+
type of memory to reclaim from (anon, file, ..).
1258+
12551259
Please note that the kernel can over or under reclaim from
12561260
the target cgroup. If less bytes are reclaimed than the
12571261
specified amount, -EAGAIN is returned.
@@ -1263,13 +1267,6 @@ PAGE_SIZE multiple when read back.
12631267
This means that the networking layer will not adapt based on
12641268
reclaim induced by memory.reclaim.
12651269

1266-
This file also allows the user to specify the nodes to reclaim from,
1267-
via the 'nodes=' key, for example::
1268-
1269-
echo "1G nodes=0,1" > memory.reclaim
1270-
1271-
The above instructs the kernel to reclaim memory from nodes 0,1.
1272-
12731270
memory.peak
12741271
A read-only single value file which exists on non-root
12751272
cgroups.

arch/ia64/kernel/sys_ia64.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,9 @@ ia64_mremap (unsigned long addr, unsigned long old_len, unsigned long new_len, u
170170
asmlinkage long
171171
ia64_clock_getres(const clockid_t which_clock, struct __kernel_timespec __user *tp)
172172
{
173+
struct timespec64 rtn_tp;
174+
s64 tick_ns;
175+
173176
/*
174177
* ia64's clock_gettime() syscall is implemented as a vdso call
175178
* fsys_clock_gettime(). Currently it handles only
@@ -185,8 +188,8 @@ ia64_clock_getres(const clockid_t which_clock, struct __kernel_timespec __user *
185188
switch (which_clock) {
186189
case CLOCK_REALTIME:
187190
case CLOCK_MONOTONIC:
188-
s64 tick_ns = DIV_ROUND_UP(NSEC_PER_SEC, local_cpu_data->itc_freq);
189-
struct timespec64 rtn_tp = ns_to_timespec64(tick_ns);
191+
tick_ns = DIV_ROUND_UP(NSEC_PER_SEC, local_cpu_data->itc_freq);
192+
rtn_tp = ns_to_timespec64(tick_ns);
190193
return put_timespec64(&rtn_tp, tp);
191194
}
192195

arch/sh/kernel/vmlinux.lds.S

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
* Written by Niibe Yutaka and Paul Mundt
55
*/
66
OUTPUT_ARCH(sh)
7+
#define RUNTIME_DISCARD_EXIT
78
#include <asm/thread_info.h>
89
#include <asm/cache.h>
910
#include <asm/vmlinux.lds.h>

drivers/of/fdt.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
#include <linux/serial_core.h>
2727
#include <linux/sysfs.h>
2828
#include <linux/random.h>
29-
#include <linux/kmemleak.h>
3029

3130
#include <asm/setup.h> /* for COMMAND_LINE_SIZE */
3231
#include <asm/page.h>
@@ -525,12 +524,9 @@ static int __init __reserved_mem_reserve_reg(unsigned long node,
525524
size = dt_mem_next_cell(dt_root_size_cells, &prop);
526525

527526
if (size &&
528-
early_init_dt_reserve_memory(base, size, nomap) == 0) {
527+
early_init_dt_reserve_memory(base, size, nomap) == 0)
529528
pr_debug("Reserved memory: reserved region for node '%s': base %pa, size %lu MiB\n",
530529
uname, &base, (unsigned long)(size / SZ_1M));
531-
if (!nomap)
532-
kmemleak_alloc_phys(base, size, 0);
533-
}
534530
else
535531
pr_err("Reserved memory: failed to reserve memory for node '%s': base %pa, size %lu MiB\n",
536532
uname, &base, (unsigned long)(size / SZ_1M));

fs/freevxfs/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ config VXFS_FS
88
of SCO UnixWare (and possibly others) and optionally available
99
for Sunsoft Solaris, HP-UX and many other operating systems. However
1010
these particular OS implementations of vxfs may differ in on-disk
11-
data endianess and/or superblock offset. The vxfs module has been
11+
data endianness and/or superblock offset. The vxfs module has been
1212
tested with SCO UnixWare and HP-UX B.10.20 (pa-risc 1.1 arch.)
1313
Currently only readonly access is supported and VxFX versions
1414
2, 3 and 4. Tests were performed with HP-UX VxFS version 3.

fs/proc/task_mmu.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -745,9 +745,7 @@ static int smaps_hugetlb_range(pte_t *pte, unsigned long hmask,
745745
page = pfn_swap_entry_to_page(swpent);
746746
}
747747
if (page) {
748-
int mapcount = page_mapcount(page);
749-
750-
if (mapcount >= 2)
748+
if (page_mapcount(page) >= 2 || hugetlb_pmd_shared(pte))
751749
mss->shared_hugetlb += huge_page_size(hstate_vma(vma));
752750
else
753751
mss->private_hugetlb += huge_page_size(hstate_vma(vma));

fs/squashfs/squashfs_fs.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ static inline int squashfs_block_size(__le32 raw)
183183
#define SQUASHFS_ID_BLOCK_BYTES(A) (SQUASHFS_ID_BLOCKS(A) *\
184184
sizeof(u64))
185185
/* xattr id lookup table defines */
186-
#define SQUASHFS_XATTR_BYTES(A) ((A) * sizeof(struct squashfs_xattr_id))
186+
#define SQUASHFS_XATTR_BYTES(A) (((u64) (A)) * sizeof(struct squashfs_xattr_id))
187187

188188
#define SQUASHFS_XATTR_BLOCK(A) (SQUASHFS_XATTR_BYTES(A) / \
189189
SQUASHFS_METADATA_SIZE)

fs/squashfs/squashfs_fs_sb.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ struct squashfs_sb_info {
6363
long long bytes_used;
6464
unsigned int inodes;
6565
unsigned int fragments;
66-
int xattr_ids;
66+
unsigned int xattr_ids;
6767
unsigned int ids;
6868
bool panic_on_errors;
6969
const struct squashfs_decompressor_thread_ops *thread_ops;

fs/squashfs/xattr.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@
1010

1111
#ifdef CONFIG_SQUASHFS_XATTR
1212
extern __le64 *squashfs_read_xattr_id_table(struct super_block *, u64,
13-
u64 *, int *);
13+
u64 *, unsigned int *);
1414
extern int squashfs_xattr_lookup(struct super_block *, unsigned int, int *,
1515
unsigned int *, unsigned long long *);
1616
#else
1717
static inline __le64 *squashfs_read_xattr_id_table(struct super_block *sb,
18-
u64 start, u64 *xattr_table_start, int *xattr_ids)
18+
u64 start, u64 *xattr_table_start, unsigned int *xattr_ids)
1919
{
2020
struct squashfs_xattr_id_table *id_table;
2121

0 commit comments

Comments
 (0)