From: "Jarkko Sakkinen" <jarkko@kernel.org>
To: "Jarkko Sakkinen" <jarkko@kernel.org>,
"Christophe JAILLET" <christophe.jaillet@wanadoo.fr>,
"Peter Huewe" <peterhuewe@gmx.de>,
"Jason Gunthorpe" <jgg@ziepe.ca>,
"Matthew Garrett" <mjg59@srcf.ucam.org>
Cc: <linux-kernel@vger.kernel.org>, <kernel-janitors@vger.kernel.org>,
<linux-integrity@vger.kernel.org>
Subject: Re: [PATCH] tpm_crb: Fix an error handling path in crb_acpi_add()
Date: Tue, 22 Aug 2023 14:31:26 +0300 [thread overview]
Message-ID: <CUZ1G69D6DVR.10SDRFENHCCAZ@suppilovahvero> (raw)
In-Reply-To: <CUZ1DUXBEAWM.6JDTPLT9I7NM@suppilovahvero>
rn Tue Aug 22, 2023 at 2:28 PM EEST, Jarkko Sakkinen wrote:
> On Sun Aug 20, 2023 at 9:21 AM EEST, Christophe JAILLET wrote:
> > Le 25/02/2023 à 11:58, Christophe JAILLET a écrit :
> > > Some error paths don't call acpi_put_table() before returning.
> > > Branch to the correct place instead of doing some direct return.
> > >
> > > Fixes: 4d2732882703 ("tpm_crb: Add support for CRB devices based on Pluton")
> > > Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> > > ---
> > > drivers/char/tpm/tpm_crb.c | 5 +++--
> > > 1 file changed, 3 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/drivers/char/tpm/tpm_crb.c b/drivers/char/tpm/tpm_crb.c
> > > index 99698ee1a744..f7068bd8b3d0 100644
> > > --- a/drivers/char/tpm/tpm_crb.c
> > > +++ b/drivers/char/tpm/tpm_crb.c
> > > @@ -771,12 +771,13 @@ static int crb_acpi_add(struct acpi_device *device)
> > > FW_BUG "TPM2 ACPI table has wrong size %u for start method type %d\n",
> > > buf->header.length,
> > > ACPI_TPM2_COMMAND_BUFFER_WITH_PLUTON);
> > > - return -EINVAL;
> > > + rc = -EINVAL;
> > > + goto out;
> > > }
> > > crb_pluton = ACPI_ADD_PTR(struct tpm2_crb_pluton, buf, sizeof(*buf));
> > > rc = crb_map_pluton(dev, priv, buf, crb_pluton);
> > > if (rc)
> > > - return rc;
> > > + goto out;
> > > }
> > >
> > > priv->sm = sm;
> >
> > Hi,
> >
> > polite reminder.
> >
> > While re-looking at it, the 3rd parameter of crb_map_pluton() (i.e. buf)
> > looks unused and could be removed if it makes sense to you.
>
> This AFAIK went to Linux v6.2 already.
Sorry I overlooked! There was bunch of patches with almost similar name,
so I must have overlooked also back then. Now it is applied.
Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>
BR, Jarkko
prev parent reply other threads:[~2023-08-22 11:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-25 10:58 [PATCH] tpm_crb: Fix an error handling path in crb_acpi_add() Christophe JAILLET
2023-08-20 6:21 ` Christophe JAILLET
2023-08-20 6:25 ` Matthew Garrett
2023-08-22 11:28 ` Jarkko Sakkinen
2023-08-22 11:31 ` Jarkko Sakkinen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CUZ1G69D6DVR.10SDRFENHCCAZ@suppilovahvero \
--to=jarkko@kernel.org \
--cc=christophe.jaillet@wanadoo.fr \
--cc=jgg@ziepe.ca \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-integrity@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mjg59@srcf.ucam.org \
--cc=peterhuewe@gmx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox