cxl: Fix lockdep warning while creating afu_err_buff attribute

Michael Ellerman mpe at ellerman.id.au
Fri Sep 25 12:12:02 AEST 2015


On Wed, 2015-23-09 at 03:07:59 UTC, Vaibhav Jain wrote:
> Presently a lockdep warning is reported during creation of afu_err_buff
> bin_attribute for the afu. This is caused due to the variable attr.key
> not pointing to a static class key, hence the function lockdep_init_map
> reports this warning:
> 
>  BUG: key <some-address> not in .data!
> 
> The patch fixes this issue by calling sysfs_attr_init on the
> attr_eb.attr structure before populating it with the afu_err_buff file
> details. This will populate the attr.key variable with a static class
> key so that lockdep_init_map stops complaining about the lockdep key not
> being static.
> 
> Reported-by: Daniel Axtens <dja at axtens.net>
> Signed-off-by: Vaibhav Jain <vaibhav at linux.vnet.ibm.com>
> Acked-by: Ian Munsie <imunsie at au1.ibm.com>
> Reviewed-by: Daniel Axtens <dja at axtens.net>

Applied to powerpc fixes, thanks.

https://git.kernel.org/powerpc/c/d6eb71a6d2eda21c8cd7a4dc

cheers


More information about the Linuxppc-dev mailing list