From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Martin K. Petersen" Date: Wed, 06 Jun 2018 01:38:37 +0000 Subject: Re: [PATCH] scsi: aic7xxx: aic79xx: fix potential null pointer dereference on ahd Message-Id: List-Id: References: <20180531123117.32118-1-colin.king@canonical.com> In-Reply-To: <20180531123117.32118-1-colin.king@canonical.com> (Colin King's message of "Thu, 31 May 2018 13:31:17 +0100") MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Colin King Cc: Hannes Reinecke , "James E . J . Bottomley" , "Martin K . Petersen" , linux-scsi@vger.kernel.org, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Colin, > If AHD_DEBUG is enabled and ahd_platform_alloc fails then ahd is set > to null and the debug printk dereferences ahd when passing it to > ahd_name. Fix this by moving the debug printk to before the call to > ahd_platform_alloc where ahd is not null at that point. Applied to 4.18/scsi-fixes. Thanks! -- Martin K. Petersen Oracle Linux Engineering From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Martin K. Petersen" Subject: Re: [PATCH] scsi: aic7xxx: aic79xx: fix potential null pointer dereference on ahd Date: Tue, 05 Jun 2018 21:38:37 -0400 Message-ID: References: <20180531123117.32118-1-colin.king@canonical.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: In-Reply-To: <20180531123117.32118-1-colin.king@canonical.com> (Colin King's message of "Thu, 31 May 2018 13:31:17 +0100") Sender: linux-kernel-owner@vger.kernel.org To: Colin King Cc: Hannes Reinecke , "James E . J . Bottomley" , "Martin K . Petersen" , linux-scsi@vger.kernel.org, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org List-Id: linux-scsi@vger.kernel.org Colin, > If AHD_DEBUG is enabled and ahd_platform_alloc fails then ahd is set > to null and the debug printk dereferences ahd when passing it to > ahd_name. Fix this by moving the debug printk to before the call to > ahd_platform_alloc where ahd is not null at that point. Applied to 4.18/scsi-fixes. Thanks! -- Martin K. Petersen Oracle Linux Engineering