fault.c (7cc8c75b54fa6d2c0a802b915feecad3abe6ddd7) | fault.c (36ef159f4408b08eae7f2af6d62bedd3f4343758) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-or-later 2/* 3 * Copyright (C) 2009 Sunplus Core Technology Co., Ltd. 4 * Lennox Wu <lennox.wu@sunplusct.com> 5 * Chen Liqin <liqin.chen@sunplusct.com> 6 * Copyright (C) 2012 Regents of the University of California 7 */ 8 --- 221 unchanged lines hidden (view full) --- 230 * Fault-in kernel-space virtual memory on-demand. 231 * The 'reference' page table is init_mm.pgd. 232 * 233 * NOTE! We MUST NOT take any locks for this case. We may 234 * be in an interrupt or a critical region, and should 235 * only copy the information from the master page table, 236 * nothing more. 237 */ | 1// SPDX-License-Identifier: GPL-2.0-or-later 2/* 3 * Copyright (C) 2009 Sunplus Core Technology Co., Ltd. 4 * Lennox Wu <lennox.wu@sunplusct.com> 5 * Chen Liqin <liqin.chen@sunplusct.com> 6 * Copyright (C) 2012 Regents of the University of California 7 */ 8 --- 221 unchanged lines hidden (view full) --- 230 * Fault-in kernel-space virtual memory on-demand. 231 * The 'reference' page table is init_mm.pgd. 232 * 233 * NOTE! We MUST NOT take any locks for this case. We may 234 * be in an interrupt or a critical region, and should 235 * only copy the information from the master page table, 236 * nothing more. 237 */ |
238 if (unlikely((addr >= VMALLOC_START) && (addr < VMALLOC_END))) { | 238 if (unlikely((addr >= VMALLOC_START) && (addr <= VMALLOC_END))) { |
239 vmalloc_fault(regs, code, addr); 240 return; 241 } 242 243#ifdef CONFIG_64BIT 244 /* 245 * Modules in 64bit kernels lie in their own virtual region which is not 246 * in the vmalloc region, but dealing with page faults in this region --- 78 unchanged lines hidden (view full) --- 325 /* 326 * If we need to retry but a fatal signal is pending, handle the 327 * signal first. We do not need to release the mmap_lock because it 328 * would already be released in __lock_page_or_retry in mm/filemap.c. 329 */ 330 if (fault_signal_pending(fault, regs)) 331 return; 332 | 239 vmalloc_fault(regs, code, addr); 240 return; 241 } 242 243#ifdef CONFIG_64BIT 244 /* 245 * Modules in 64bit kernels lie in their own virtual region which is not 246 * in the vmalloc region, but dealing with page faults in this region --- 78 unchanged lines hidden (view full) --- 325 /* 326 * If we need to retry but a fatal signal is pending, handle the 327 * signal first. We do not need to release the mmap_lock because it 328 * would already be released in __lock_page_or_retry in mm/filemap.c. 329 */ 330 if (fault_signal_pending(fault, regs)) 331 return; 332 |
333 if (unlikely((fault & VM_FAULT_RETRY) && (flags & FAULT_FLAG_ALLOW_RETRY))) { | 333 if (unlikely(fault & VM_FAULT_RETRY)) { |
334 flags |= FAULT_FLAG_TRIED; 335 336 /* 337 * No need to mmap_read_unlock(mm) as we would 338 * have already released it in __lock_page_or_retry 339 * in mm/filemap.c. 340 */ 341 goto retry; --- 12 unchanged lines hidden --- | 334 flags |= FAULT_FLAG_TRIED; 335 336 /* 337 * No need to mmap_read_unlock(mm) as we would 338 * have already released it in __lock_page_or_retry 339 * in mm/filemap.c. 340 */ 341 goto retry; --- 12 unchanged lines hidden --- |