From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f45.google.com (mail-wr1-f45.google.com [209.85.221.45]) by mx.groups.io with SMTP id smtpd.web08.10914.1637673570409546630 for ; Tue, 23 Nov 2021 05:19:30 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@nuviainc-com.20210112.gappssmtp.com header.s=20210112 header.b=A0q0Ng3H; spf=pass (domain: nuviainc.com, ip: 209.85.221.45, mailfrom: leif@nuviainc.com) Received: by mail-wr1-f45.google.com with SMTP id a9so38911720wrr.8 for ; Tue, 23 Nov 2021 05:19:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuviainc-com.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=jRZUc3/SKq+6FmOGgtu1JHs+SWU5nI2DgvTSz6AIg5o=; b=A0q0Ng3HOTSuOA3hCEgRxbzr5nh4AtHv8KIUSHXOfk6dCTxWgQhXzMpAEwbcYB2cUk 9vxZpbSXVqVs7lxBbHS2hYej/8iOqGH8cObT6QBOyYI0ewp2jK8siJohCJfCq4HLu0Z4 1GPVdny8GrM1Cw8s52vKYcLThZ7LkCs+5fqxVvqLHMUblBT2sHWjoAMgJf/QidTRW5Js xAfCGHGFsu2+wS5ILNrqbnDbwpYUgwYkEDXVnpkr3rJWyUvUJk9dY/D8LPin52RZb1QZ Nfqdl5q/UlxIjJFdmx7W/6NVZwieZkpCFrt84D3WS/LAdeT6QHr7xl3haYWJptTGJ2Jx NgEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=jRZUc3/SKq+6FmOGgtu1JHs+SWU5nI2DgvTSz6AIg5o=; b=wqqFvbw1fkfCF8NO5SBDGGJTYBU5O9nqSP3STvo72zeXJN9UR+8OXUG3kMmyzyEk5h XENwbGb5uVSVhb6RO2dcVb1LRVdLEaCG28QHZEz5bgQ0iEPOib7ImOX4sSPq9g9K3nhx Z7/oOrHJywH0Zin9Hk33nZh4B9Nf4HLwecULh3VhuET+ZbrbVYAihZirafYw+oBEyiE6 u89lhzTIyRZwj/M3OA6PzfcpxJinI05bzxhZ9SpThf/4pew5HbkMkf6GPSz/Wjjm/3wo JSZ1C4s/3SdSMoSuLhGDEuWpXIqItZqTQecFuuJLnjUUGfDVLsfSg2eeB08VoZgjRlaX RzBA== X-Gm-Message-State: AOAM532m1MRwpN7ZDmjQ/ocZmTR9vdyzU9D7lP00luDSVegjebaLPSqS hJ6FgTiRnzW5guyWe9iKkYcodA== X-Google-Smtp-Source: ABdhPJzQnWh0sqhHJappskSTvlqydjfoof4x1eAE4eNogQAeIyMiWUK++B2jHt3jylR4iEvmuimqhg== X-Received: by 2002:a05:6000:381:: with SMTP id u1mr7365524wrf.302.1637673568921; Tue, 23 Nov 2021 05:19:28 -0800 (PST) Return-Path: Received: from leviathan (cpc92314-cmbg19-2-0-cust559.5-4.cable.virginm.net. [82.11.186.48]) by smtp.gmail.com with ESMTPSA id s8sm12153533wro.19.2021.11.23.05.19.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Nov 2021 05:19:28 -0800 (PST) Date: Tue, 23 Nov 2021 13:19:26 +0000 From: "Leif Lindholm" To: Rebecca Cran , gaoliming@byosoft.com.cn Cc: devel@edk2.groups.io, Hao A Wu , Ray Ni , Andrew Fish , Michael D Kinney Subject: edk2-stable202111 Re: [edk2-devel] [PATCH] MdeModulePkg AtaAtapiPassThru: Skip the potential NULL pointer access Message-ID: References: <20211116025328.1604-1-gaoliming@byosoft.com.cn> <680de582-f33a-edd3-afbc-f9aafd05595d@nuviainc.com> MIME-Version: 1.0 In-Reply-To: <680de582-f33a-edd3-afbc-f9aafd05595d@nuviainc.com> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Since BZ3732 has been triggered by a standard build of a platform in edk2-platforms, I would request that this fix is brought into the upcoming stable tag. SbsaQemu isn't a "real" platform, so I don't consider that in itself sufficient reason, but I feel the risk of it affecting other (including out-of-tree) platforms justifies it. Best Regards, Leif On Tue, Nov 23, 2021 at 06:10:14 -0700, Rebecca Cran wrote: > Acked-by: Rebecca Cran > > > I've confirmed that this patch fixes the exception I was seeing when running > the DEBUG build of SbsaQemu. > > > -- > > Rebecca Cran > > > On 11/15/21 7:53 PM, gaoliming wrote: > > BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3732 > > Recent change c974257821208fc6191779d1ddea918499f165b8 exposes this potential issue. > > > > Signed-off-by: Liming Gao > > Cc: Hao A Wu > > Cc: Ray Ni > > --- > > MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.c | 7 +++++++ > > 1 file changed, 7 insertions(+) > > > > diff --git a/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.c b/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.c > > index 7626bac38d..bda900a161 100644 > > --- a/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.c > > +++ b/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.c > > @@ -885,6 +885,13 @@ AhciPrintStatusBlock ( > > IN UINT32 DebugLevel > > ) > > { > > + // > > + // Skip NULL pointer > > + // > > + if (AtaStatusBlock == NULL) { > > + return; > > + } > > + > > // > > // Only print status and error since we have all of the rest printed as > > // a part of command block print.