Skip to content

Commit a1fd058

Browse files
committed
Merge tag 'mm-hotfixes-stable-2023-05-03-16-27' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Pull hitfixes from Andrew Morton: "Five hotfixes. Three are cc:stable, two for this -rc cycle" * tag 'mm-hotfixes-stable-2023-05-03-16-27' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: mm: change per-VMA lock statistics to be disabled by default MAINTAINERS: update Michal Simek's email mm/mempolicy: correctly update prev when policy is equal on mbind relayfs: fix out-of-bounds access in relay_file_read kasan: hw_tags: avoid invalid virt_to_page()
2 parents 15fb96a + 6152e53 commit a1fd058

6 files changed

Lines changed: 18 additions & 8 deletions

File tree

.mailmap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,7 @@ Maxime Ripard <mripard@kernel.org> <maxime.ripard@bootlin.com>
328328
Maxime Ripard <mripard@kernel.org> <maxime.ripard@free-electrons.com>
329329
Mayuresh Janorkar <mayur@ti.com>
330330
Michael Buesch <m@bues.ch>
331+
Michal Simek <michal.simek@amd.com> <michal.simek@xilinx.com>
331332
Michel Dänzer <michel@tungstengraphics.com>
332333
Michel Lespinasse <michel@lespinasse.org>
333334
Michel Lespinasse <michel@lespinasse.org> <walken@google.com>

MAINTAINERS

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3039,7 +3039,7 @@ F: drivers/video/fbdev/wm8505fb*
30393039
F: drivers/video/fbdev/wmt_ge_rops.*
30403040

30413041
ARM/ZYNQ ARCHITECTURE
3042-
M: Michal Simek <michal.simek@xilinx.com>
3042+
M: Michal Simek <michal.simek@amd.com>
30433043
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
30443044
S: Supported
30453045
W: http://wiki.xilinx.com
@@ -23129,7 +23129,7 @@ F: drivers/net/can/xilinx_can.c
2312923129
XILINX GPIO DRIVER
2313023130
M: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
2313123131
R: Srinivas Neeli <srinivas.neeli@xilinx.com>
23132-
R: Michal Simek <michal.simek@xilinx.com>
23132+
R: Michal Simek <michal.simek@amd.com>
2313323133
S: Maintained
2313423134
F: Documentation/devicetree/bindings/gpio/xlnx,gpio-xilinx.yaml
2313523135
F: Documentation/devicetree/bindings/gpio/gpio-zynq.yaml

kernel/relay.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -989,7 +989,8 @@ static size_t relay_file_read_start_pos(struct rchan_buf *buf)
989989
size_t subbuf_size = buf->chan->subbuf_size;
990990
size_t n_subbufs = buf->chan->n_subbufs;
991991
size_t consumed = buf->subbufs_consumed % n_subbufs;
992-
size_t read_pos = consumed * subbuf_size + buf->bytes_consumed;
992+
size_t read_pos = (consumed * subbuf_size + buf->bytes_consumed)
993+
% (n_subbufs * subbuf_size);
993994

994995
read_subbuf = read_pos / subbuf_size;
995996
padding = buf->padding[read_subbuf];

mm/Kconfig.debug

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,12 @@ config DEBUG_KMEMLEAK_AUTO_SCAN
274274
config PER_VMA_LOCK_STATS
275275
bool "Statistics for per-vma locks"
276276
depends on PER_VMA_LOCK
277-
default y
278277
help
279-
Statistics for per-vma locks.
278+
Say Y here to enable success, retry and failure counters of page
279+
faults handled under protection of per-vma locks. When enabled, the
280+
counters are exposed in /proc/vmstat. This information is useful for
281+
kernel developers to evaluate effectiveness of per-vma locks and to
282+
identify pathological cases. Counting these events introduces a small
283+
overhead in the page fault path.
284+
285+
If in doubt, say N.

mm/kasan/hw_tags.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ static void init_vmalloc_pages(const void *start, unsigned long size)
285285
const void *addr;
286286

287287
for (addr = start; addr < start + size; addr += PAGE_SIZE) {
288-
struct page *page = virt_to_page(addr);
288+
struct page *page = vmalloc_to_page(addr);
289289

290290
clear_highpage_kasan_tagged(page);
291291
}
@@ -297,7 +297,7 @@ void *__kasan_unpoison_vmalloc(const void *start, unsigned long size,
297297
u8 tag;
298298
unsigned long redzone_start, redzone_size;
299299

300-
if (!kasan_vmalloc_enabled() || !is_vmalloc_or_module_addr(start)) {
300+
if (!kasan_vmalloc_enabled()) {
301301
if (flags & KASAN_VMALLOC_INIT)
302302
init_vmalloc_pages(start, size);
303303
return (void *)start;

mm/mempolicy.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -808,8 +808,10 @@ static int mbind_range(struct vma_iterator *vmi, struct vm_area_struct *vma,
808808
vmstart = vma->vm_start;
809809
}
810810

811-
if (mpol_equal(vma_policy(vma), new_pol))
811+
if (mpol_equal(vma_policy(vma), new_pol)) {
812+
*prev = vma;
812813
return 0;
814+
}
813815

814816
pgoff = vma->vm_pgoff + ((vmstart - vma->vm_start) >> PAGE_SHIFT);
815817
merged = vma_merge(vmi, vma->vm_mm, *prev, vmstart, vmend, vma->vm_flags,

0 commit comments

Comments
 (0)