error-inject.c (4f2c0a4acffbec01079c28f839422e64ddeff004) | error-inject.c (6338bb05c15f88e2f4beae296ef389224837758c) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 2// error-inject.c: Function-level error injection table 3#include <linux/error-injection.h> 4#include <linux/debugfs.h> 5#include <linux/kallsyms.h> 6#include <linux/kprobes.h> 7#include <linux/module.h> 8#include <linux/mutex.h> --- 26 unchanged lines hidden (view full) --- 35 } 36 mutex_unlock(&ei_mutex); 37 return ret; 38} 39 40int get_injectable_error_type(unsigned long addr) 41{ 42 struct ei_entry *ent; | 1// SPDX-License-Identifier: GPL-2.0 2// error-inject.c: Function-level error injection table 3#include <linux/error-injection.h> 4#include <linux/debugfs.h> 5#include <linux/kallsyms.h> 6#include <linux/kprobes.h> 7#include <linux/module.h> 8#include <linux/mutex.h> --- 26 unchanged lines hidden (view full) --- 35 } 36 mutex_unlock(&ei_mutex); 37 return ret; 38} 39 40int get_injectable_error_type(unsigned long addr) 41{ 42 struct ei_entry *ent; |
43 int ei_type = EI_ETYPE_NONE; | 43 int ei_type = -EINVAL; |
44 45 mutex_lock(&ei_mutex); 46 list_for_each_entry(ent, &error_injection_list, list) { 47 if (addr >= ent->start_addr && addr < ent->end_addr) { 48 ei_type = ent->etype; 49 break; 50 } 51 } --- 190 unchanged lines hidden --- | 44 45 mutex_lock(&ei_mutex); 46 list_for_each_entry(ent, &error_injection_list, list) { 47 if (addr >= ent->start_addr && addr < ent->end_addr) { 48 ei_type = ent->etype; 49 break; 50 } 51 } --- 190 unchanged lines hidden --- |