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.

mm: vmalloc: update outdated comment for renamed vread()

The function vread() was renamed to vread_iter() in commit 4c91c07c93bb
("mm: vmalloc: convert vread() to vread_iter()"), converting from a
buffer-based to an iterator-based interface.

Update the kdoc of vread_iter() to reflect the new interface: replace
references to @buf with @iter, drop the stale "kernel's buffer"
requirement, and update the self-reference from vread() to vread_iter().

Also update the stale vread() reference in pstore's ram_core.c.

Assisted-by: unnamed:deepseek-v3.2 coccinelle
Link: https://lkml.kernel.org/r/20260321105820.7134-1-kexinsun@smail.nju.edu.cn
Signed-off-by: Kexin Sun <kexinsun@smail.nju.edu.cn>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Cc: "Guilherme G. Piccoli" <gpiccoli@igalia.com>
Cc: Julia Lawall <julia.lawall@inria.fr>
Cc: Kees Cook <kees@kernel.org>
Cc: Tony Luck <tony.luck@intel.com>
Cc: "Uladzislau Rezki (Sony)" <urezki@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Kexin Sun and committed by
Andrew Morton
3cb0dc0d c4a9439a

+6 -6
+1 -1
fs/pstore/ram_core.c
··· 450 450 pages[i] = pfn_to_page(addr >> PAGE_SHIFT); 451 451 } 452 452 /* 453 - * VM_IOREMAP used here to bypass this region during vread() 453 + * VM_IOREMAP used here to bypass this region during vread_iter() 454 454 * and kmap_atomic() (i.e. kcore) to avoid __va() failures. 455 455 */ 456 456 vaddr = vmap(pages, page_count, VM_MAP | VM_IOREMAP, prot);
+5 -5
mm/vmalloc.c
··· 4575 4575 * @count: number of bytes to be read. 4576 4576 * 4577 4577 * This function checks that addr is a valid vmalloc'ed area, and 4578 - * copy data from that area to a given buffer. If the given memory range 4578 + * copies data from that area to a given iterator. If the given memory range 4579 4579 * of [addr...addr+count) includes some valid address, data is copied to 4580 - * proper area of @buf. If there are memory holes, they'll be zero-filled. 4580 + * proper area of @iter. If there are memory holes, they'll be zero-filled. 4581 4581 * IOREMAP area is treated as memory hole and no copy is done. 4582 4582 * 4583 4583 * If [addr...addr+count) doesn't includes any intersects with alive 4584 - * vm_struct area, returns 0. @buf should be kernel's buffer. 4584 + * vm_struct area, returns 0. 4585 4585 * 4586 - * Note: In usual ops, vread() is never necessary because the caller 4586 + * Note: In usual ops, vread_iter() is never necessary because the caller 4587 4587 * should know vmalloc() area is valid and can use memcpy(). 4588 4588 * This is for routines which have to access vmalloc area without 4589 4589 * any information, as /proc/kcore. 4590 4590 * 4591 - * Return: number of bytes for which addr and buf should be increased 4591 + * Return: number of bytes for which addr and iter should be advanced 4592 4592 * (same number as @count) or %0 if [addr...addr+count) doesn't 4593 4593 * include any intersection with valid vmalloc area 4594 4594 */