From patchwork Sun Aug 21 19:57:17 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heinrich Schuchardt X-Patchwork-Id: 9292761 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 84663600CB for ; Mon, 22 Aug 2016 00:40:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 77477287DE for ; Mon, 22 Aug 2016 00:40:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6C1B6287F4; Mon, 22 Aug 2016 00:40:06 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 272E7287DE for ; Mon, 22 Aug 2016 00:40:06 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 881836E2A2; Mon, 22 Aug 2016 00:40:00 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mout.gmx.net (mout.gmx.net [212.227.15.18]) by gabe.freedesktop.org (Postfix) with ESMTPS id F2A5A6E202 for ; Sun, 21 Aug 2016 19:57:28 +0000 (UTC) Received: from workstation4.fritz.box ([109.91.48.91]) by mail.gmx.com (mrgmx003) with ESMTPSA (Nemesis) id 0MPE7E-1bXB9n3A00-004P0V; Sun, 21 Aug 2016 21:57:23 +0200 From: Heinrich Schuchardt To: Patrik Jakobsson Subject: [PATCH 1/1] drm/gma500: dont expose stack, mrst_lvds_find_best_pll Date: Sun, 21 Aug 2016 21:57:17 +0200 Message-Id: <1471809437-4377-1-git-send-email-xypron.glpk@gmx.de> X-Mailer: git-send-email 2.1.4 X-Provags-ID: V03:K0:VRMndhOwsZTBcPkj7EO1j/9qcVTHAXKfKAJFXDm4fP2BCLwZ0Dn QhYrtWzY8sMwX8s8ugh/f0GJjBUKw6yzuCQ0l4XBUYdeC1i4RLl3IkSNOZVbYSb8hMPyQJb mz0Cy664sFLqUo9QRcaoUyIO67jeoN2LSp312eFnXsv7JMlizcoWGkDdVyi4/vW+TSRXRTy bJ6GhhtXpsvd+YFcdAOdQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:L3KPXceQ9i0=:EQIBkKxlLuaIjREjk7Bteh 6BI4j8kpANH0KK7CSYrKEmWH7+oW5cHaTbTe4/x/pXlWRBCb943kBSSC+t1hYoNBGa58lJeBg mFKvYGlOo4g/XYRXrWduPOugCJFpQiTGqlSVsAUFdpi3kLEMxnaLcdShrF2xzimHhCYWK8QdP FsJ9P6CAPvc0ey0thdp/dz1jlICurzzzAGzZIJlOLPSxiIdUdFgcrVnvOXuLYiB9uQyhm6mg5 YJB2ezajP/9N9fo3Q26yUX43mokPMjLKVg3Eu/QnUsGRhHAiEmDKfExneSI9ggmCpEcFJf3dL be2heV3JoIVafkFsmkAM9wWHTcn79le+Hx6z9/G6ePUndHMn4aZVmbUW64y2qCsUyVlFsnIqs IXN3zuqu8qe/cj4UpA5n1j6AvpMCDdobsFQM9upcF7euZxiaQEWkBdLflIKMT9nb4A1cBwkDg XqdOnt6PYDUtBtGKRTfEYecQJD2XO7XckWHodZSNwAaAo5Xhwd6rjd9+Rg0MZwcGGFevpBC9M W5Jal8KBaLBa3bxmeNa//VQduZiXonVd0iqi9LTiw14geM1W4CyALTFEIh0fznsdtonihBVIi O0FvmQVB8Gz9lMDVJiGgmLWtUYJwHCUWLVbOL5AwSJnZVBiqsrRYPIfxINS5ELQ+wOqSSs1SO UoTA6sd72HmknpYJzykX3PJ/+/KOM7IhyOn+SCMR8QYTnH8ujbZJA2J+/JTfzauN9IGUNAcji 04zSuxFYmzoVpc8Zf+MoGMlaZmBM8NF10nw+CufufA1NS/hsviv01qArqUY= X-Mailman-Approved-At: Mon, 22 Aug 2016 00:39:59 +0000 Cc: Joe Perches , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Heinrich Schuchardt X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP All components of variable clock should be initialized to avoid bytes from the kernel stack to be exposed. Reported-by: Joe Perches Signed-off-by: Heinrich Schuchardt --- drivers/gpu/drm/gma500/oaktrail_crtc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/gma500/oaktrail_crtc.c b/drivers/gpu/drm/gma500/oaktrail_crtc.c index 28bd8f3..0277d85 100644 --- a/drivers/gpu/drm/gma500/oaktrail_crtc.c +++ b/drivers/gpu/drm/gma500/oaktrail_crtc.c @@ -195,6 +195,7 @@ static bool mrst_lvds_find_best_pll(const struct gma_limit_t *limit, struct gma_clock_t clock; int err = target; + memset(clock, 0, sizeof(struct gma_clock_t)); memset(best_clock, 0, sizeof(*best_clock)); for (clock.m = limit->m.min; clock.m <= limit->m.max; clock.m++) {