From patchwork Wed Aug 9 10:13:37 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Wilson X-Patchwork-Id: 9890183 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 A5651601EB for ; Wed, 9 Aug 2017 10:13:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 93B9928A51 for ; Wed, 9 Aug 2017 10:13:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 86EED28A56; Wed, 9 Aug 2017 10:13:48 +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, 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 0E89228A51 for ; Wed, 9 Aug 2017 10:13:48 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 951B66E292; Wed, 9 Aug 2017 10:13:47 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from fireflyinternet.com (mail.fireflyinternet.com [109.228.58.192]) by gabe.freedesktop.org (Postfix) with ESMTPS id BA2A56E292 for ; Wed, 9 Aug 2017 10:13:46 +0000 (UTC) X-Default-Received-SPF: pass (skip=forwardok (res=PASS)) x-ip-name=78.156.65.138; Received: from haswell.alporthouse.com (unverified [78.156.65.138]) by fireflyinternet.com (Firefly Internet (M1)) with ESMTP id 8178795-1500050 for multiple; Wed, 09 Aug 2017 11:13:35 +0100 Received: by haswell.alporthouse.com (sSMTP sendmail emulation); Wed, 09 Aug 2017 11:13:38 +0100 From: Chris Wilson To: intel-gfx@lists.freedesktop.org Date: Wed, 9 Aug 2017 11:13:37 +0100 Message-Id: <20170809101337.29391-1-chris@chris-wilson.co.uk> X-Mailer: git-send-email 2.13.3 X-Originating-IP: 78.156.65.138 X-Country: code=GB country="United Kingdom" ip=78.156.65.138 Subject: [Intel-gfx] [PATCH igt] lib/kms: Clear unused fields for getproperty ioctl X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP ==24749== Syscall param ioctl(generic) points to uninitialised byte(s) ==24749== at 0x6A8ADC7: ioctl (syscall-template.S:84) ==24749== by 0x5067687: drmIoctl (in /opt/xorg/lib64/libdrm.so.2.4.0) ==24749== by 0x138531: kmstest_set_connector_dpms (igt_kms.c:1022) ==24749== by 0x112937: set_dpms (kms_flip.c:263) ==24749== by 0x112937: run_test_step (kms_flip.c:776) ==24749== by 0x112937: event_loop (kms_flip.c:1138) ==24749== by 0x115468: run_test_on_crtc_set (kms_flip.c:1378) ==24749== by 0x115468: run_test (kms_flip.c:1450) ==24749== by 0x1111CF: main (kms_flip.c:1673) ==24749== Address 0x1ffefff2a0 is on thread 1's stack ==24749== in frame #2, created by kmstest_set_connector_dpms (igt_kms.c:1012) Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala --- lib/igt_kms.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/igt_kms.c b/lib/igt_kms.c index 9fe800d1..0c6dbf74 100644 --- a/lib/igt_kms.c +++ b/lib/igt_kms.c @@ -1014,11 +1014,10 @@ void kmstest_set_connector_dpms(int fd, drmModeConnector *connector, int mode) bool found_it = false; for (i = 0; i < connector->count_props; i++) { - struct drm_mode_get_property prop; + struct drm_mode_get_property prop = { + .prop_id = connector->props[i], + }; - prop.prop_id = connector->props[i]; - prop.count_values = 0; - prop.count_enum_blobs = 0; if (drmIoctl(fd, DRM_IOCTL_MODE_GETPROPERTY, &prop)) continue;