# \[PATCH v2 1/3\] fault-inject: make fault injection available for modules

- From: Per Forlin \<hidden\>
- Date: 2011-07-20 21:50:33 
- List: linux-arm-kernel
- Page: https://ratatoskr.run/linux-arm-kernel/2011/07/3743225
- Thread: https://ratatoskr.run/linux-arm-kernel/2011/07/3742831/t.md

```text
Hi James,

On 20 July 2011 01:44, J Freyensee [ref] wrote:
> On 07/19/2011 02:31 PM, Per Forlin wrote:
>>
>> export symbols should_fail() and init_fault_attr_dentries() in order
>> to make modules use the fault injection functionality
>>
>> Signed-off-by: Per Forlin<redacted>
>> ---
>> ?lib/fault-inject.c | ? ?2 ++
>> ?1 files changed, 2 insertions(+), 0 deletions(-)
>>
>> diff --git a/lib/fault-inject.c b/lib/fault-inject.c
>> index 7e65af7..cd28364 100644
>> --- a/lib/fault-inject.c
>> +++ b/lib/fault-inject.c
>> @@ -131,6 +131,7 @@ bool should_fail(struct fault_attr *attr, ssize_t
>> size)
>>
>> ? ? ? ?return true;
>> ?}
>> +EXPORT_SYMBOL(should_fail);
>
> Should this be EXPORT_SYMBOL_GPL()?
>
I forgot to consider this. GPL is fine with me. I'll update.

>>
>> ?#ifdef CONFIG_FAULT_INJECTION_DEBUG_FS
>>
>> @@ -311,5 +312,6 @@ fail:
>> ? ? ? ?cleanup_fault_attr_dentries(attr);
>> ? ? ? ?return -ENOMEM;
>> ?}
>> +EXPORT_SYMBOL(init_fault_attr_dentries);
>
> and here too?
>
dito.

>>
>> ?#endif /* CONFIG_FAULT_INJECTION_DEBUG_FS */
>
>
> --
> J (James/Jay) Freyensee
> Storage Technology Group
> Intel Corporation
>
```
