]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/amd/display: Initialize attribute for hdcp_srm sysfs file
authorDavid Ward <david.ward@gatech.edu>
Mon, 10 May 2021 09:30:39 +0000 (05:30 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 19 May 2021 08:29:50 +0000 (10:29 +0200)
commit738d4417c87cb413fbf6662c59b559a77c338f3f
tree52bb91cd2640c09db7edea3f7d685c7948c19082
parent79b3d63a7bbba2d5cbb6c2e82d9c893856989b3a
drm/amd/display: Initialize attribute for hdcp_srm sysfs file

commit fe1c97d008f86f672f0e9265f180c22451ca3b9f upstream.

It is stored in dynamically allocated memory, so sysfs_bin_attr_init() must
be called to initialize it. (Note: "initialization" only sets the .attr.key
member in this struct; it does not change the value of any other members.)

Otherwise, when CONFIG_DEBUG_LOCK_ALLOC=y this message appears during boot:

    BUG: key ffff9248900cd148 has not been registered!

Fixes: 9037246bb2da ("drm/amd/display: Add sysfs interface for set/get srm")
Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1586
Reported-by: Mikhail Gavrilov <mikhail.v.gavrilov@gmail.com>
Signed-off-by: David Ward <david.ward@gatech.edu>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c