Received: by 2002:a05:6a10:c7c6:0:0:0:0 with SMTP id h6csp1403011pxy; Mon, 2 Aug 2021 00:09:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzPCyUkPuMoVpw3HldYALwV5KNKT1Esw/vN5k/Pcc1aOYKcGFBlbtvplSoagVVX6pU2aOUK X-Received: by 2002:a17:906:4ad9:: with SMTP id u25mr14132829ejt.106.1627888156332; Mon, 02 Aug 2021 00:09:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627888156; cv=none; d=google.com; s=arc-20160816; b=fsxCSMSYST9lKEVGdokb79pPw79Tk7uW/CYP7m1AXqzNoSED40Yu82TYISUKkF/qd1 g3mb0Xd+p86ftE5Y45dfXxqxU+TD1Nb9Uam/+NePrbxbbjUKTFbjN8rj7wKxkHQ02W2v 4whtK8tUgPZUay3tPd7HmwdYZdoSG4+pHwkZxUbWOiXn1Ugq2uwe377FiRqIEDFHxC9k 2EQP6faDkFjxccys3jTGg1RPO/Qp4gO+GrkILmgraYeosvlOgbNf7upU76Nm96JeUYdG K84OMdWeAVvk9OyOnqloLT4OH5v7aq37JrBsw0qy8iWTWijZVirSWgA/B6k+tvBRO0EO eJIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=uEUhzvFqayR5zU3wa7oJcpsys3Qe3nbUh5KMRtO0EE4=; b=N8hfI6mdgkOQb1pdtXiPx9PVRcjuVngNG8uWKtCIHgcbBo1NuoRMcoqr6nDQfZMupb Z+8WKmqgBMijfpOSwvDLD17s7dLzGFgItsUKpDcRpvgR3U6MO2D4B18MIB0tC88cMpw8 eEE6zFvmHztGrFIvBadM/QlHS/eukfqcuo3jAcd78UN/dd714YkujqkQWhL5u+H/ikyk J8XaXL05LksJex3jwIb+IR6Q6SjNsPHaaE7TZwQx90k2U+V72b0I2zJnBcgxEMEbn5S4 bAatfm/KGoV8+47/Uzj6N23FiRjR5WYIWmava0R3AvnSqNs0VfJ92IPl3FFvww2xCgYQ pwsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Z+ViBvFa; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id de42si9036984ejc.471.2021.08.02.00.08.53; Mon, 02 Aug 2021 00:09:16 -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=@kernel.org header.s=k20201202 header.b=Z+ViBvFa; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232440AbhHBHFc (ORCPT + 99 others); Mon, 2 Aug 2021 03:05:32 -0400 Received: from mail.kernel.org ([198.145.29.99]:33406 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229500AbhHBHFb (ORCPT ); Mon, 2 Aug 2021 03:05:31 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id D4D7260D07; Mon, 2 Aug 2021 07:05:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1627887922; bh=ID3QPU3TyBOAKKkdlpM3Bwv4/0UAdfGdwlG5J7Q7QHk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Z+ViBvFaT4zwK8uyWj0UrpIzZAfmeP5uB5bbYpWA3Imvat/uFLq3xjbhSWvtHsAvh zpUqla8AAR/nlMfllxdjYCkLaQlyDYi3be4Fr51sNsJg+nlvwFkBVZxnteyibEX1Oi pCq2sVap83EP3sQ8yUT2WfKXp4e4skfFZ3BNNQwm9YPlrMnFJO5yoaAzaSLx+9kFer J72t1r8tbOJeZfjyhH+WknjBomnUX7I37IMAVBkYQtXD5Bhso3Ru9LsfRbqji1pye6 Pfdy9uBZAJC1eqD2CUvRujdcOtVFIbwTR3O6epYYQOvKUmKtILpfx0bSDcMoHzr0JY i5EGzO6xj0Aww== Date: Mon, 2 Aug 2021 12:35:18 +0530 From: Vinod Koul To: Christophe JAILLET Cc: dave.jiang@intel.com, dan.j.williams@intel.com, dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: Re: [PATCH] dmaengine: idxd: Fix a possible NULL pointer dereference Message-ID: References: <77f0dc4f3966591d1f0cffb614a94085f8895a85.1627560174.git.christophe.jaillet@wanadoo.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <77f0dc4f3966591d1f0cffb614a94085f8895a85.1627560174.git.christophe.jaillet@wanadoo.fr> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 29-07-21, 14:04, Christophe JAILLET wrote: > 'device_driver_attach()' dereferences its first argument (i.e. 'alt_drv') > so it must not be NULL. > Simplify the error handling logic about NULL 'alt_drv' in order to be > more robust and future-proof. Applied, thanks -- ~Vinod