[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d7dce94a-d857-dc1e-1917-d715940bc356@nokia.com>
Date: Mon, 16 Sep 2019 09:29:27 +0000
From: "Sverdlin, Alexander (Nokia - DE/Ulm)" <alexander.sverdlin@...ia.com>
To: Jean Delvare <jdelvare@...e.de>,
"Xu, Lingyan (NSB - CN/Hangzhou)" <lingyan.xu@...ia-sbell.com>
CC: "Adamski, Krzysztof (Nokia - PL/Wroclaw)"
<krzysztof.adamski@...ia.com>,
"Wiebe, Wladislav (Nokia - DE/Ulm)" <wladislav.wiebe@...ia.com>,
"linux-i2c@...r.kernel.org" <linux-i2c@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] i801_smbus: clear SMBALERT status bit and disable
SMBALERT interrupt
Hi Jean,
On 05/09/2019 14:57, Jean Delvare wrote:
> If this is of any value to you, I tried implementing it in i2c-i801 a
> few days ago. I can't really test it though as I don't have any device
> which triggers an alert on my system, but I am sharing it with you if
> you want to give it a try. You would still need to write the code in
> the slave driver.
and I forgot another issue:
> @@ -1897,8 +1956,10 @@ static void i801_remove(struct pci_dev *
> pm_runtime_forbid(&dev->dev);
> pm_runtime_get_noresume(&dev->dev);
>
> - i801_disable_host_notify(priv);
> + i801_restore_slvcmd(priv);
> i801_del_mux(priv);
> + if (priv->ara)
> + i2c_unregister_device(priv->ara);
to me it looks like a race with IRQ handler (IRQ is only disabled *after*
remove()), it can still attempt to use freed ARA device after this line.
> i2c_del_adapter(&priv->adapter);
> i801_acpi_remove(priv);
> pci_write_config_byte(dev, SMBHSTCFG, priv->original_hstcfg);
--
Best regards,
Alexander Sverdlin.
Powered by blists - more mailing lists