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: <20170510215650.GA29507@dtor-ws>
Date:   Wed, 10 May 2017 14:56:50 -0700
From:   Dmitry Torokhov <dmitry.torokhov@...il.com>
To:     Sebastian Reichel <sre@...nel.org>
Cc:     Tony Lindgren <tony@...mide.com>, Rob Herring <robh+dt@...nel.org>,
        linux-input@...r.kernel.org, linux-omap@...r.kernel.org,
        devicetree@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCHv3 1/2] Input: pwm-vibra: new driver

On Mon, May 08, 2017 at 08:51:28PM +0200, Sebastian Reichel wrote:
> On Sun, May 07, 2017 at 02:38:00PM -0700, Dmitry Torokhov wrote:
> > > +static int __maybe_unused pwm_vibrator_suspend(struct device *dev)
> > > +{
> > > +	struct platform_device *pdev = to_platform_device(dev);
> > > +	struct pwm_vibrator *vibrator = platform_get_drvdata(pdev);
> > > +	struct input_dev *input = vibrator->input;
> > > +	unsigned long flags;
> > > +
> > > +	spin_lock_irqsave(&input->event_lock, flags);
> > 
> > Hmm, no, this is not goting to work. The original patch had a chance if
> > PWM was not sleeping, but with introduction of regulator and work this
> > definitely sleeps.
> 
> Actually PWM is sleeping, that's why I added work (regulator was
> added later) :)
> 
> > I think we should solve issue of events [not] being delivered during
> > suspend transition in input core, and simply drop spin_lock_irqsave()
> > here and in resume().
> 
> Sounds good. will you take care of the input-core change?

Yeah, I'll add it to my todo... In the mean time, when you sending a new
version of this driver simply drop
spin_lock_irqsave/spin_unlock_irqrestore.

Thanks.

-- 
Dmitry

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ