Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4617804pxj; Wed, 12 May 2021 09:20:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyw7hNUiPfKERU8zdAgUCIYBQswyJzF+OpKnGaA6LQMnPAfTibHQmNVf7ADtsxs6vbAVaZ3 X-Received: by 2002:a50:bae6:: with SMTP id x93mr8856402ede.48.1620836424655; Wed, 12 May 2021 09:20:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620836424; cv=none; d=google.com; s=arc-20160816; b=ScFkT+7+juT9VrgO3Ls0cju06d9F8cH+ulP7gXriv+rx8KZQ9u65tCmEft/BLjJvTc ftqexmkyXIOfRoqN6B/N7qCA9bV7lml433K9cYvbb1nShPrDtXxSASOJLwl7Ju8XAcbP 3QfSBLnjvSHKCU8h/ICCb09p2WTSc+CUW10GYna/8HMu4M1L3NhfgEcIXRTXojY714Eg +HXrIXjyU5Lq1oFNgfg1WqhbG+n59jjI+wZer2lZvO/rPa5wdRJFOO5XFYyaxOW7vE/+ 3rHxyurWKIfaohH6ETfeV6+pdwi8q46U09tbeAKFlSNQBEkpeCwFGb2sAumIj2ed3+Qm X1qg== 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=qmR12DPBOWAVWc7op81LBxVkhW9KoSgkgiGGNcRSC9M=; b=ClPRA9BKW6BqSWNVOHJ8wdBFlHnknuXjFaVdN4dhx0GCy263ZSQzvQh5YlrJTxbyuV jZntwXYbZVvaMYuXrlUjKHax8ZRnq/I1W7L8uqw+1Qb7K4rUi7hEsQ2MMrFDGHrizkV4 kcGwufL/Ne5hm+Iq/s4KcLoQr2zrk3Rsr08rVCuddwEpk45Br2C8wP+6eMKpIhcVy3r1 Pjsgzz98b7pSSBIWcQTphXwVZkQAtasU9uHls0c66vraUWlwCTdIARWeRDFo/YF0XzzZ gOerGIBuQEuICvVJ9XP9GdKiB1n+0MGdxR7EonsNZlVoF0UCh3dH53u44933Q4SMZ3Ui YiFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ywAJw4Ar; 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 qk30si397301ejb.152.2021.05.12.09.19.58; Wed, 12 May 2021 09:20:24 -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=ywAJw4Ar; 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 S236489AbhELQLa (ORCPT + 99 others); Wed, 12 May 2021 12:11:30 -0400 Received: from mail.kernel.org ([198.145.29.99]:46964 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235781AbhELPaH (ORCPT ); Wed, 12 May 2021 11:30:07 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 58F9361439; Wed, 12 May 2021 15:15:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1620832544; bh=WDjFGuq1cWNi5L26WqICwsFtsg74FulEGGH77+spOkI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ywAJw4ArBng2jIT1bDGFSCyPtox2X7Vj+hb+rcVrut+0HaOgmALMZ5YwgSMKailMX s7ukTHfyirE4chNdVEOKCAZ0rnC84E8fx0S2UZDgzBzWPRiKvHv8F893xXOavQlXgW j5MxB4urKXrzTBejgRVOMyEkq2ESDPhN5ewmbk6Q= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dan Carpenter , Michal Simek , Daniel Vetter , Sasha Levin Subject: [PATCH 5.10 322/530] drm: xlnx: zynqmp: fix a memset in zynqmp_dp_train() Date: Wed, 12 May 2021 16:47:12 +0200 Message-Id: <20210512144830.397061224@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210512144819.664462530@linuxfoundation.org> References: <20210512144819.664462530@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: Dan Carpenter [ Upstream commit 5842ab76bbfadb37eaea91e53c1efe34ae504e4a ] The dp->train_set[] for this driver is only two characters, not four so this memsets too much. Fortunately, this ends up corrupting a struct hole and not anything important. Fixes: d76271d22694 ("drm: xlnx: DRM/KMS driver for Xilinx ZynqMP DisplayPort Subsystem") Signed-off-by: Dan Carpenter Reviewed-by: Michal Simek Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/YGLwCBMotnrKZu6P@mwanda Signed-off-by: Sasha Levin --- drivers/gpu/drm/xlnx/zynqmp_dp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/xlnx/zynqmp_dp.c b/drivers/gpu/drm/xlnx/zynqmp_dp.c index 99158ee67d02..59d1fb017da0 100644 --- a/drivers/gpu/drm/xlnx/zynqmp_dp.c +++ b/drivers/gpu/drm/xlnx/zynqmp_dp.c @@ -866,7 +866,7 @@ static int zynqmp_dp_train(struct zynqmp_dp *dp) return ret; zynqmp_dp_write(dp, ZYNQMP_DP_SCRAMBLING_DISABLE, 1); - memset(dp->train_set, 0, 4); + memset(dp->train_set, 0, sizeof(dp->train_set)); ret = zynqmp_dp_link_train_cr(dp); if (ret) return ret; -- 2.30.2