Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3134053pxj; Mon, 17 May 2021 18:41:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyFLwAPetZ/j9A5tgtCVY0LuIZLj32optV5UYLOIWWKGNlVeP77MYkmfkrufgCnALtSLuJN X-Received: by 2002:a02:a918:: with SMTP id n24mr2850033jam.125.1621302061658; Mon, 17 May 2021 18:41:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621302061; cv=none; d=google.com; s=arc-20160816; b=eCUAiUO/zX59c9SMmB0EuXUBlXZ3s0hwIAKCbi3oIGHCoCINAovuHbnpC6yFj4hPBt 5XAnO7kPTfPWukrQdtL85e52Wyfw4Q9sC1+vb9rJ5ZVbVDSjN9k0wVFzmJLYDW8iLVF+ bPZLx5T+soS0c/0YxQihZzTZ8sRNz2tuHav5mwXZ60Js8qNXEPbPxYIa3sYndYip8hYS Fdqqf7042/S54dfKeRTH9Ul9lwBci6KhWBhqY1fyWNrJeshYxata7vR7jZH/WdyhYtLg 7cKioCV2kJkD2vk0w7YkRIkshCXEJIRR2BaIfO6CPRrTOCVzauirspHKA69YULfYF5NI Q7SA== 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=YWuMbPEnldNm9wW9NuGCYFqQRSDgBGGvhW2CuMGi5R8=; b=H45GRGz60c5g3dzDP9zW3CtqJXI7lfBrimBfJxNO4IG/Yrtzz+ea6/4PwqDoeO8YCL U4sJVbsMtJc43xWZdetoHMSLGEX1kxyUNTl4zGbie4qxLZfmIebESCqZsmz4BgakHGVF AN9J+1BkUSl7oWNl6Sz85tptrgq5PVjWZ2iGxnSDuSZkcsfPwo42kNoSo5ILMESMpSHA fr8KSxdQ9YTHviObFN5JPUQPA+XfOvsGWyBXP7xPllSHl/wKkb9Uo+XWsbd+7m0V/ry0 +x2G/GLe8Hak0vyE/4I2qKNy6hxlXYC7hlleQwyfkljB/rH+pJDipJKeImihx392EY5X D/uA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=xcEiw4ZL; 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 g10si10335078ilf.140.2021.05.17.18.40.49; Mon, 17 May 2021 18:41:01 -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=xcEiw4ZL; 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 S239357AbhEQOgB (ORCPT + 99 others); Mon, 17 May 2021 10:36:01 -0400 Received: from mail.kernel.org ([198.145.29.99]:43352 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240166AbhEQObm (ORCPT ); Mon, 17 May 2021 10:31:42 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id D88E460724; Mon, 17 May 2021 14:15:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621260935; bh=GsjwyJwei04lRhfVymzvcOdX0gTCiyKpcJFrSvFrcLw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xcEiw4ZL4HCDAYjGdM2LRppwXWcKtpTcq5z3B/s93muCV7Nb3oFa8XD2aTiQL2cY6 /QpvnUcnavTvM8gVZAE2ftUIprj4vlYcpNDbBgAWw+snglHjXIzcB0LbR5T8LJtIKa sez4n2EiRU3jKAyGfsYCdZ797UwXOV1RFaH5jEl4= 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.12 270/363] drm/amd/display: Initialize attribute for hdcp_srm sysfs file Date: Mon, 17 May 2021 16:02:16 +0200 Message-Id: <20210517140311.744101815@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210517140302.508966430@linuxfoundation.org> References: <20210517140302.508966430@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 @@ -644,6 +644,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");