Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp567536pxj; Tue, 18 May 2021 09:23:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy6uFAh2ti/v9HzTxvs5k56G9hfqPRNoz6jK6p1KxBOkYyOPsBeuNzVQ2n2TBPoJJ8T3dOy X-Received: by 2002:a05:6e02:e05:: with SMTP id a5mr4877526ilk.235.1621355034517; Tue, 18 May 2021 09:23:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621355034; cv=none; d=google.com; s=arc-20160816; b=Pg0Ua3XMKbEEvX5xU+PpaeSaeYjiG7HmmvvZeKarPXesRcCDzb6mpbyJQyl9g4QZkR tG1hmvrQrnJY3puXR3aGYbwwj8mEwAH0ytGPcRzmV6xQ0ph2QkFEZLUl7IUjeZ74vofF 75oWostFU9Vi/7cU6xwDIUKdssdUpG4l2lAqZjE8kVliqmcAf9BqxMvzI2tVoTYaRpJK 1szbl9usTZ3Y3cNKAub8UNP0mtFtN0mvCOfw59Exc6IMoymfrTdRsw/ymT8Yv9KcivwJ zdsryNERN07TsSsReiuhW93VLn8rRr+8Gjbj/EaFQyOqJfTVbI+ddO6ZHhQXqRL3Smtg q+8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=WG0Vy84q7ZoI65RBGoMW5aoJbLT3VwZmhslKJ8GQVwI=; b=LBJb1FnsGwTepvJoyyX5P+cMQHnmkQY3o/DmHOAtd3bdbgied70YXbz+Av3MTrB9l2 obWdzgkppdmoq5S8l9M6l+jFpUct51VKIAHWKozYU5SEoY3O4H5qtFpwpZDOZGPFUeLT 2JgwFwW+p8NjwIZQ2woGVl3qoT1D8w+stxOnW0avByPhusCtqAmEb/eGOZND+6i1CDIG XOqYQRuo1KHoRF5sBVdHyKuoC11wN1ie/ivucZdE54K7BHClZSSRaADdubtzfkRlXjNP XKQyFNm8GWBeUwtn7SNUOFOeXQvFw7t97EWtIV7lK/rjVAiV9ujR69LU+R3nt8KDAcIZ PHNA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Sibph7BD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k6si21072900ilo.39.2021.05.18.09.23.39; Tue, 18 May 2021 09:23:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Sibph7BD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244057AbhEQQBy (ORCPT + 99 others); Mon, 17 May 2021 12:01:54 -0400 Received: from mail.kernel.org ([198.145.29.99]:51992 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243156AbhEQPlz (ORCPT ); Mon, 17 May 2021 11:41:55 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id CD7E461411; Mon, 17 May 2021 14:42:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621262536; bh=AiU/BgLvW2ctw3w72amgEsbBuG1O1PL/JwBVyj4teM0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Sibph7BD4qtpu/oxGDjy8ZSdBeyC0p6IFWPDUEZIE962zO7JwCqFQ3wFrpI5J/sGv 5PmjFh57CCgf2WOlUfgt3N12c3qR4oWfoICLVuNI7kP1sTclkFw1GZP1l/KVBbSx23 Vg8vcO0q+ZFKujO5u6BS/5u8yV714FtxwmWoubt0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Mikhail Gavrilov , David Ward , Alex Deucher Subject: [PATCH 5.10 209/289] drm/amd/display: Initialize attribute for hdcp_srm sysfs file Date: Mon, 17 May 2021 16:02:14 +0200 Message-Id: <20210517140312.157955632@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210517140305.140529752@linuxfoundation.org> References: <20210517140305.140529752@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: David Ward 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 Signed-off-by: David Ward Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c @@ -643,6 +643,7 @@ struct hdcp_workqueue *hdcp_create_workq /* File created at /sys/class/drm/card0/device/hdcp_srm*/ hdcp_work[0].attr = data_attr; + sysfs_bin_attr_init(&hdcp_work[0].attr); if (sysfs_create_bin_file(&adev->dev->kobj, &hdcp_work[0].attr)) DRM_WARN("Failed to create device file hdcp_srm");