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]
Date: Thu, 7 Mar 2024 21:33:28 +0100
From: Paul Menzel <pmenzel@...gen.mpg.de>
To: Jarkko Sakkinen <jarkko@...nel.org>
Cc: Lino Sanfilippo <l.sanfilippo@...bus.com>, peterhuewe@....de,
 LinoSanfilippo@....de, p.rosenberger@...bus.com, lukas@...ner.de,
 jgg@...pe.ca, linux-integrity@...r.kernel.org, linux-kernel@...r.kernel.org,
 stable@...r.kernel.org
Subject: Re: [PATCH] tpm,tpm_tis: Avoid warning splat at shutdown

Dear Jarkko,


Am 07.03.24 um 21:05 schrieb Jarkko Sakkinen:
> On Tue Mar 5, 2024 at 5:43 PM EET, Paul Menzel wrote:

>> Am 01.02.24 um 12:36 schrieb Lino Sanfilippo:
>>> If interrupts are not activated the work struct 'free_irq_work' is not
>>> initialized. This results in a warning splat at module shutdown.
>>>
>>> Fix this by always initializing the work regardless of whether interrupts
>>> are activated or not.
>>>
>>> cc: stable@...r.kernel.org
>>> Fixes: 481c2d14627d ("tpm,tpm_tis: Disable interrupts after 1000 unhandled IRQs")
>>> Reported-by: Jarkko Sakkinen <jarkko@...nel.org>
>>> Closes: https://lore.kernel.org/all/CX32RFOMJUQ0.3R4YCL9MDCB96@kernel.org/
>>> Signed-off-by: Lino Sanfilippo <l.sanfilippo@...bus.com>
>>> ---
>>>    drivers/char/tpm/tpm_tis_core.c | 3 +--
>>>    1 file changed, 1 insertion(+), 2 deletions(-)
>>>
>>> diff --git a/drivers/char/tpm/tpm_tis_core.c b/drivers/char/tpm/tpm_tis_core.c
>>> index 1b350412d8a6..64c875657687 100644
>>> --- a/drivers/char/tpm/tpm_tis_core.c
>>> +++ b/drivers/char/tpm/tpm_tis_core.c
>>> @@ -919,8 +919,6 @@ static int tpm_tis_probe_irq_single(struct tpm_chip *chip, u32 intmask,
>>>    	int rc;
>>>    	u32 int_status;
>>>    
>>> -	INIT_WORK(&priv->free_irq_work, tpm_tis_free_irq_func);
>>> -
>>>    	rc = devm_request_threaded_irq(chip->dev.parent, irq, NULL,
>>>    				       tis_int_handler, IRQF_ONESHOT | flags,
>>>    				       dev_name(&chip->dev), chip);
>>> @@ -1132,6 +1130,7 @@ int tpm_tis_core_init(struct device *dev, struct tpm_tis_data *priv, int irq,
>>>    	priv->phy_ops = phy_ops;
>>>    	priv->locality_count = 0;
>>>    	mutex_init(&priv->locality_count_mutex);
>>> +	INIT_WORK(&priv->free_irq_work, tpm_tis_free_irq_func);
>>>    
>>>    	dev_set_drvdata(&chip->dev, priv);
>>
>> This is commit d6fb14208e22 in jarkko/next.
>>
>> I tested this patch on top of Linux 6.8-rc7 on a Dell OptiPlex 5055 [1]
>> and it fixes the issue there too.
> 
> Thanks!
> 
> If you don't mind I'll add your tested-by to the commit before I send
> my next pull request to Linus?

Sure, go ahead. I thought, it’s not going to be amended, and therefore 
didn’t add the tag.

Tested-by: Paul Menzel <pmenzel@...gen.mpg.de>


Kind regards,

Paul

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ