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: <20241005190851.66145d1b@jic23-huawei>
Date: Sat, 5 Oct 2024 19:08:51 +0100
From: Jonathan Cameron <jic23@...nel.org>
To: Abhash jha <abhashkumarjha123@...il.com>
Cc: linux-iio@...r.kernel.org, lars@...afoo.de, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/3] iio: light: vl6180: Added Interrupt support for
 single shot access

On Sat, 5 Oct 2024 23:05:25 +0530
Abhash jha <abhashkumarjha123@...il.com> wrote:

> > > +     if (client->irq) {
> > > +             reinit_completion(&data->completion);  
> >
> > That's late so there is a race condition. You might be delayed just before this
> > and finish the measurement before the reint_completion() in which case you'll
> > clear the complete() that happens in the interrupt handler before
> > then waiting on it.  
> Yes this makes sense.
> 
> > This reinit needs to be before whatever can potentially trigger
> > that interrupt.  
> Can you explain this part, because where can i reinit it, The measurement
> starts when we write the START_STOP bit to SYSRANGE_START. So should
> it be before that.
Immediately above that write looks right to me. So before writing START_STOP.
That way the completion will be ready for a complete whenever
one turns up.

Jonathan

> I'm kind of confused with this.
> 
> Thank you,
> Abhash


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ