lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <YC9/cr9Km/jWzmon@kernel.org>
Date:   Fri, 19 Feb 2021 11:05:54 +0200
From:   Jarkko Sakkinen <jarkko@...nel.org>
To:     Lino Sanfilippo <LinoSanfilippo@....de>
Cc:     peterhuewe@....de, jgg@...pe.ca, stefanb@...ux.vnet.ibm.com,
        James.Bottomley@...senpartnership.com, David.Laight@...lab.com,
        linux-integrity@...r.kernel.org, linux-kernel@...r.kernel.org,
        Lino Sanfilippo <l.sanfilippo@...bus.com>,
        stable@...r.kernel.org
Subject: Re: [PATCH RESEND v5] tpm: fix reference counting for struct tpm_chip

On Thu, Feb 18, 2021 at 08:13:57PM +0100, Lino Sanfilippo wrote:
> 
> Hi,
> 
> On 17.02.21 at 23:18, Jarkko Sakkinen wrote:
> 
> >> +
> >
> > /*
> >  * Please describe what the heck the function does. No need for full on
> >  * kdoc.
> >  */
> 
> Ok.
> 
> >> +int tpm2_add_device(struct tpm_chip *chip)
> >
> > Please, rename as tpm_devs_add for coherency sake.
> >
> 
> Sorry I confused this and renamed it wrongly. I will fix it in the next
> patch version.
> 
> >> +{
> >> +	int rc;
> >> +
> >> +	device_initialize(&chip->devs);
> >> +	chip->devs.parent = chip->dev.parent;
> >> +	chip->devs.class = tpmrm_class;
> >
> > Empty line. Cannot recall, if I stated before.
> >> +	/* +	 * get extra reference on main device to hold on behalf of devs.
> >> +	 * This holds the chip structure while cdevs is in use. The
> >> +	 * corresponding put is in the tpm_devs_release.
> >> +	 */
> >> +	get_device(&chip->dev);
> >> +	chip->devs.release = tpm_devs_release;
> >> +	chip->devs.devt = MKDEV(MAJOR(tpm_devt),
> >> +					chip->dev_num + TPM_NUM_DEVICES);
> >
> > NAK, same comment as before.
> >
> 
> Thx for the review, I will fix these issues.

Yeah, I mean I'm going to collect this fix anyway after rc1 has been
released so there's a lot of time to polish small details. I.e. I'm
doing a PR for rc2 with the fix included.

> Regards,
> Lino

/Jarkko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ