Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp726651ybp; Wed, 9 Oct 2019 03:18:15 -0700 (PDT) X-Google-Smtp-Source: APXvYqyIOn6Jj/8HH1S6B3msLW6qbw9qyOm3M9cSwmpmMVL7C48s47sclOQZFVMczx8ersyRUkhJ X-Received: by 2002:a05:6402:1b88:: with SMTP id cc8mr2212821edb.22.1570616295497; Wed, 09 Oct 2019 03:18:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570616295; cv=none; d=google.com; s=arc-20160816; b=SQTdUyrRpGHzkK5CHB5VqZ9XMFlTiDRkGUN6oMXTG5GH/q0Yl5or9ds2Phf7FscgYW rJXde2Be+Zh1w+uAwCjkJsB2EOUm63pSSrvx8m79xTXd98TMKCqQcs8MCSFuFk1oURIG xc4WAaRaRnqlWHt+iQC2ZNL1Pu4J6fdrBRlqgJ6AfaVYhSt9kiYtURghQjdnzaeIKSv8 SQeuhV5CcTQC+TznkOJeIZHRU9EwOKMLk93lyJFMpiVm/JbVVzaaNXklvvfgWi6EteMZ h0hNjtWQzABbxHgAM5MCF3ECEK35XB79ngDVV50LnPmMfOYESptaULGrpqgClf0ifb31 2G3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:subject:user-agent:message-id :references:cc:in-reply-to:from:to:content-transfer-encoding :mime-version; bh=NGB75Gt2jgFKuLqCFeMly5wwtCytxQ+K+GbibfiI5yQ=; b=M7bHsjNuY3C4WPnjnUl8vgbtbPk/E35a0r5SUF5lz4lCya2C0wbNWKv3Wm0CE19wDF 5f5LbsNT8pMo/GnbCBKaOkaJqYCM2a+j3uDhrmCe/+s58dEmFdMCr0V3nmOs6sOYtrYC wRtCuXH/gCP/iXl9lZuVX+FJ0x1OZgXSZcHeDaJlsCQKaVoVzJuCg1COZ/BuMOC8PAiw QD4skupbRmrfX6lEmKDsHkmSaqflTEXhZDLVM4GdkOZh0/NKoRop+bMwWrXll8n7ZTxB 6+Czm0wiSvGZZaovplLWYwAZcBfyCHQ7H68Ky4rr6VA64a9KTbDRubPpSkux936ATv6j /NZg== 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 l22si971990edb.241.2019.10.09.03.17.52; Wed, 09 Oct 2019 03:18:15 -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 S1729686AbfJIKPr convert rfc822-to-8bit (ORCPT + 99 others); Wed, 9 Oct 2019 06:15:47 -0400 Received: from mail.fireflyinternet.com ([109.228.58.192]:63928 "EHLO fireflyinternet.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726579AbfJIKPr (ORCPT ); Wed, 9 Oct 2019 06:15:47 -0400 X-Default-Received-SPF: pass (skip=forwardok (res=PASS)) x-ip-name=78.156.65.138; Received: from localhost (unverified [78.156.65.138]) by fireflyinternet.com (Firefly Internet (M1)) with ESMTP (TLS) id 18775438-1500050 for multiple; Wed, 09 Oct 2019 11:15:44 +0100 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8BIT To: Colin King , Daniel Vetter , David Airlie , Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , Tvrtko Ursulin , dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org From: Chris Wilson In-Reply-To: <20191009100024.23077-1-colin.king@canonical.com> Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org References: <20191009100024.23077-1-colin.king@canonical.com> Message-ID: <157061614282.18808.3604540678077210321@skylake-alporthouse-com> User-Agent: alot/0.6 Subject: Re: [PATCH][next] drm/i915/selftests: fix null pointer dereference on pointer data Date: Wed, 09 Oct 2019 11:15:42 +0100 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Colin King (2019-10-09 11:00:24) > From: Colin Ian King > > In the case where data fails to be allocated the error exit path is > via label 'out' where data is dereferenced in a for-loop. Fix this > by exiting via the label 'out_file' instead to avoid the null pointer > dereference. > > Addresses-Coverity: ("Dereference after null check") > Fixes: 50d16d44cce4 ("drm/i915/selftests: Exercise context switching in parallel") > Signed-off-by: Colin Ian King Reviewed-by: Chris Wilson -Chris