cxl: Fix lockdep warning while creating afu_err_buff attribute

Michael Ellerman mpe at
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>
> Signed-off-by: Vaibhav Jain <vaibhav at>
> Acked-by: Ian Munsie <imunsie at>
> Reviewed-by: Daniel Axtens <dja at>

Applied to powerpc fixes, thanks.


More information about the Linuxppc-dev mailing list