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] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAO-hwJLw74k+jBnDuQ7OrVzJOy8i82OXKNWuNhxNqUj+8nzwhg@mail.gmail.com>
Date:   Mon, 29 Oct 2018 11:15:47 +0100
From:   Benjamin Tissoires <benjamin.tissoires@...hat.com>
To:     Wolfram Sang <wsa@...-dreams.de>
Cc:     ckeepax@...nsource.cirrus.com,
        Linux I2C <linux-i2c@...r.kernel.org>,
        lkml <linux-kernel@...r.kernel.org>,
        patches@...nsource.cirrus.com
Subject: Re: [PATCH 2/2] i2c: Clear client->irq in i2c_device_remove

On Sun, Oct 28, 2018 at 11:31 PM Wolfram Sang <wsa@...-dreams.de> wrote:
>
> On Fri, Oct 19, 2018 at 09:59:58AM +0100, Charles Keepax wrote:
> > The IRQ will be mapped in i2c_device_probe only if client->irq is zero and
> > i2c_device_remove does not clear this. When rebinding an I2C device,
> > whos IRQ provider has also been rebound this means that an IRQ mapping
> > will never be created, causing the I2C device to fail to acquire its
> > IRQ. Fix this issue by clearing client->irq in i2c_device_remove,
> > forcing i2c_device_probe to lookup the mapping again.
> >
> > Signed-off-by: Charles Keepax <ckeepax@...nsource.cirrus.com>
>
> Adding Benjamin here again. Also, should there be a Fixes: tag?

Not sure if the circumstances are preventing me to think straight, but
how can you reprobe the i2c_device?
And in all cases, for the Host notify part, having the IRQ already set
shouldn't be an issue.

So for the host notify case, this patch is fine, not entirely sure
about the acpi or OF part of it.

Cheers,
Benjamin

>
> > ---
> >  drivers/i2c/i2c-core-base.c | 2 ++
> >  1 file changed, 2 insertions(+)
> >
> > diff --git a/drivers/i2c/i2c-core-base.c b/drivers/i2c/i2c-core-base.c
> > index 656f0a6fe3adf..28460f6a60cc1 100644
> > --- a/drivers/i2c/i2c-core-base.c
> > +++ b/drivers/i2c/i2c-core-base.c
> > @@ -430,6 +430,8 @@ static int i2c_device_remove(struct device *dev)
> >       dev_pm_clear_wake_irq(&client->dev);
> >       device_init_wakeup(&client->dev, false);
> >
> > +     client->irq = 0;
> > +
> >       return status;
> >  }
> >
> > --
> > 2.11.0
> >

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ