Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dyndbg: properly unwind on ddebug_add_module failure
A recent change to ddebug_add_module() allowed it to fail when multiple classmaps didnt properly share the 0..62 class-id space (per module). This error flowed to the notify-handler, which avoided the WARN, and thought all was good. But testing hit a page-fault: [ 2.159815] dyndbg: Overlapping range: [0..9] on D2_CORE modprobe: ERROR: could not insert 'test_dynamic_debug_submod': Invalid argument [ 2.160133] dyndbg: bad class reservations [ 2.192181] BUG: unable to handle page fault for address: ffffffffc038b53b [ 2.192872] #PF: supervisor read access in kernel mode [ 2.193179] #PF: error_code(0x0000) - not-present page [ 2.193489] PGD 3ca43067 P4D 3ca43067 PUD 3ca45067 PMD 1aa4067 PTE 0 [ 2.193885] Oops: Oops: 0000 [#1] PREEMPT SMP NOPTI [ 2.194182] CPU: 1 UID: 0 PID: 414 Comm: grep Not tainted 6.11.0-dd-00062-g27917198ef23 torvalds#17 [ 2.194678] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 2.195036] RIP: 0010:ddebug_proc_show+0x38/0x220 Fix this (apparently) by removing the just-added module, which takes it of the ddebug-tables list, so proc-show doesn't traverse it. Signed-off-by: Jim Cromie <jim.cromie@gmail.com>
- Loading branch information