Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2499341imm; Mon, 24 Sep 2018 05:31:10 -0700 (PDT) X-Google-Smtp-Source: ACcGV631MjBVP5UcPy05J3bMviOGWYNJdxzdqn0F6yP35zWP78HCGki4knjSkzKLEAH455lHsMqy X-Received: by 2002:a63:bd41:: with SMTP id d1-v6mr9404249pgp.309.1537792270269; Mon, 24 Sep 2018 05:31:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537792270; cv=none; d=google.com; s=arc-20160816; b=B9ooT1ucn+VoGo8IWbA/DrmpIcPKxRzFZxzolUtnS1qA7hKNQZccw1sKaVQ3fKX84n 32YD6SZk2Np2BWOODw1JzPTWYHGaT06Xv15bo75K/RYxyXU4AsmdKUQPHnyerzt7+3jb cgIWGAhyJ5wuaW+KY45K64q07WApyTi1AveswQ12q8lqSALYOslvtjshFxV+sMPIlMds X4ZQr4WUr63VsjIDCjEuO1/6Xc2YymZX6SNh2V2qAAyXLkLg3l0QLq451no2eKo52dJN 1MwJRgqFKVF3mOJN902TQj9Wu2GtVWhK5R/qycgJfe2SCwUSa9Fu1zPfqPua4HlYMQcC xExw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from; bh=Om5yUasUA3AESvwOxESoN5EUCsuCnzL71RbpXSmj/Jo=; b=caG9ukFyuYozt0/hzL7IEEN42MTTeaYQfK1ni2HJ+UUlwM4IZAlhI3LIu5g0SW+N3t iZPc82Wt9F5bxoGLyDVUIzKLfVlBD0hnB8aDLLUJMmoEe1ppA5L4euTGuetI7JobA4sc UAe78c6HTyE2audXbMNPZyJGYVgGzKqN1Qoh5QOCTBtpgSvjwnqzvA5amXbkb6+Qhs/J wJ1LsPAabmcJJ0KX/GFiaRrVzBWgkWQvGdezFQuZF64Gwty+wLYfwYV5ZfG7CBBEq5ln ZhvI/C51pkkOgfvQ+MVKX8QdjwVxPZFRdOoYUa78ONB77Gx+COF4TLApELOwZQVDihkq dN1Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z2-v6si12166850plo.412.2018.09.24.05.30.55; Mon, 24 Sep 2018 05:31:10 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387802AbeIXSbt (ORCPT + 99 others); Mon, 24 Sep 2018 14:31:49 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:57712 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730962AbeIXSbs (ORCPT ); Mon, 24 Sep 2018 14:31:48 -0400 Received: from localhost (ip-213-127-77-73.ip.prioritytelecom.net [213.127.77.73]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 71A681018; Mon, 24 Sep 2018 12:29:53 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Robert Jarzmik , Daniel Mack , Bartlomiej Zolnierkiewicz , Sasha Levin Subject: [PATCH 4.18 056/235] video: fbdev: pxafb: clear allocated memory for video modes Date: Mon, 24 Sep 2018 13:50:42 +0200 Message-Id: <20180924113110.678771624@linuxfoundation.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20180924113103.999624566@linuxfoundation.org> References: <20180924113103.999624566@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Daniel Mack [ Upstream commit b951d80aaf224b1f774e10def672f5e37488e4ee ] When parsing the video modes from DT properties, make sure to zero out memory before using it. This is important because not all fields in the mode struct are explicitly initialized, even though they are used later on. Fixes: 420a488278e86 ("video: fbdev: pxafb: initial devicetree conversion") Reviewed-by: Robert Jarzmik Signed-off-by: Daniel Mack Signed-off-by: Bartlomiej Zolnierkiewicz Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/video/fbdev/pxafb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/drivers/video/fbdev/pxafb.c +++ b/drivers/video/fbdev/pxafb.c @@ -2128,8 +2128,8 @@ static int of_get_pxafb_display(struct d return -EINVAL; ret = -ENOMEM; - info->modes = kmalloc_array(timings->num_timings, - sizeof(info->modes[0]), GFP_KERNEL); + info->modes = kcalloc(timings->num_timings, sizeof(info->modes[0]), + GFP_KERNEL); if (!info->modes) goto out; info->num_modes = timings->num_timings;