vmalloc.c (82afbc32f22154d40f0bbbcfc7e18d2411f3dc92) | vmalloc.c (74640617e14fdae2cbac9dbd6fae38a811123e7d) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * linux/mm/vmalloc.c 4 * 5 * Copyright (C) 1993 Linus Torvalds 6 * Support of BIGMEM added by Gerhard Wichert, Siemens AG, July 1999 7 * SMP-safe vmalloc/vfree/ioremap, Tigran Aivazian <tigran@veritas.com>, May 2000 8 * Major rework to support vmap/vunmap, Christoph Hellwig, SGI, August 2002 --- 2119 unchanged lines hidden (view full) --- 2128/** 2129 * find_vm_area - find a continuous kernel virtual area 2130 * @addr: base address 2131 * 2132 * Search for the kernel VM area starting at @addr, and return it. 2133 * It is up to the caller to do all required locking to keep the returned 2134 * pointer valid. 2135 * | 1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * linux/mm/vmalloc.c 4 * 5 * Copyright (C) 1993 Linus Torvalds 6 * Support of BIGMEM added by Gerhard Wichert, Siemens AG, July 1999 7 * SMP-safe vmalloc/vfree/ioremap, Tigran Aivazian <tigran@veritas.com>, May 2000 8 * Major rework to support vmap/vunmap, Christoph Hellwig, SGI, August 2002 --- 2119 unchanged lines hidden (view full) --- 2128/** 2129 * find_vm_area - find a continuous kernel virtual area 2130 * @addr: base address 2131 * 2132 * Search for the kernel VM area starting at @addr, and return it. 2133 * It is up to the caller to do all required locking to keep the returned 2134 * pointer valid. 2135 * |
2136 * Return: pointer to the found area or %NULL on faulure | 2136 * Return: the area descriptor on success or %NULL on failure. |
2137 */ 2138struct vm_struct *find_vm_area(const void *addr) 2139{ 2140 struct vmap_area *va; 2141 2142 va = find_vmap_area((unsigned long)addr); 2143 if (!va) 2144 return NULL; --- 4 unchanged lines hidden (view full) --- 2149/** 2150 * remove_vm_area - find and remove a continuous kernel virtual area 2151 * @addr: base address 2152 * 2153 * Search for the kernel VM area starting at @addr, and remove it. 2154 * This function returns the found VM area, but using it is NOT safe 2155 * on SMP machines, except for its size or flags. 2156 * | 2137 */ 2138struct vm_struct *find_vm_area(const void *addr) 2139{ 2140 struct vmap_area *va; 2141 2142 va = find_vmap_area((unsigned long)addr); 2143 if (!va) 2144 return NULL; --- 4 unchanged lines hidden (view full) --- 2149/** 2150 * remove_vm_area - find and remove a continuous kernel virtual area 2151 * @addr: base address 2152 * 2153 * Search for the kernel VM area starting at @addr, and remove it. 2154 * This function returns the found VM area, but using it is NOT safe 2155 * on SMP machines, except for its size or flags. 2156 * |
2157 * Return: pointer to the found area or %NULL on faulure | 2157 * Return: the area descriptor on success or %NULL on failure. |
2158 */ 2159struct vm_struct *remove_vm_area(const void *addr) 2160{ 2161 struct vmap_area *va; 2162 2163 might_sleep(); 2164 2165 spin_lock(&vmap_area_lock); --- 1419 unchanged lines hidden --- | 2158 */ 2159struct vm_struct *remove_vm_area(const void *addr) 2160{ 2161 struct vmap_area *va; 2162 2163 might_sleep(); 2164 2165 spin_lock(&vmap_area_lock); --- 1419 unchanged lines hidden --- |