[PATCH v3 2/3] mmc: core: add random fault injection

Per Forlin per.forlin at linaro.org
Tue Jul 26 16:01:46 EDT 2011


On 26 July 2011 03:41, Akinobu Mita <akinobu.mita at gmail.com> wrote:
> 2011/7/26 Per Forlin <per.forlin at linaro.org>:
>>>> And I know that init_fault_attr_dentries() can only create a
>>>> subdirectory in debugfs root directory.  But I have a patch which
>>>> support for creating it in arbitrary directory.  Could you take a look
>>>> at this? (Note that this patch is based on mmotm and not yet tested)
>>>>
>> I looked at your patch and it raised two questions.
>> I can't use FAULT_ATTR_INITIALIZER since mmc_host is allocated on the
>> heap. It looks like setup_fault_attr(attr, str) will fail if str is
>> NULL. How can I initialise the fault_attrs if not stack allocated?
>> About the boot param initialisation of fault attr. There can only be
>> one fault_mmc_request boot param for the entire kernel but there is
>> one fault_attr per host, and there may be many hosts. It would be
>> convenient if setup_fault_attrs would take (attr, boot_param_name),
>> look up boot_param_name and use that otherwise set default values.
>
> I think you can define one default fail_attr for boot time configuration
> and copy it to per-host fail_attr in mmc_add_host_debugfs().
>
You're right. This works fine. I'll prepare a new version of my patch.



More information about the linux-arm-kernel mailing list