From: Nick Dyer <nick.dyer@itdev.co.uk>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Stephen Warren <swarren@wwwdotorg.org>,
Yufeng Shen <miletus@google.com>,
Daniel Kurtz <djkurtz@chromium.org>,
Henrik Rydberg <rydberg@euromail.se>,
Joonyoung Shim <jy0922.shim@samsung.com>,
Alan Bowens <Alan.Bowens@atmel.com>,
linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
Peter Meerwald <pmeerw@pmeerw.net>,
Benson Leung <bleung@chromium.org>,
Olof Johansson <olofj@chromium.org>, Sekhar Nori <nsekhar@ti.com>
Subject: Re: [PATCH 2/2] Input: atmel_mxt_ts - fix double free of input device
Date: Wed, 10 Sep 2014 15:31:52 +0100 [thread overview]
Message-ID: <541060D8.9020707@itdev.co.uk> (raw)
In-Reply-To: <20140909234922.GB5971@core.coreip.homeip.net>
On 10/09/14 00:49, Dmitry Torokhov wrote:
> On Tue, Sep 09, 2014 at 03:50:49PM +0100, nick.dyer@itdev.co.uk wrote:
>> From: Stephen Warren <swarren@wwwdotorg.org>
>>
>> [reworked after comments by Dmitry Torokhov. Move free of input device into
>> separate function. Only call in paths that require it. Move mxt_initialize
>> after sysfs init, because otherwise an error in the sysfs init may interfere
>> with the async return from the firmware loader. Add guards for sysfs
>> functions. ]
>
> Ugh... there is still problem with asycn firmware loading: you need to
> make sure it is done before you try to unbind the dveice. I also do not
> see what stops several firmware update requests to happen
> simultaneously. Once you add proper handling for that you can use the
> same lock in sysfs read methods.
Yes, I see what you mean. I will try and straighten it out.
> Another option is wait a bit and see what's the outcome of async probing
> discussion on LKML is and maybe we can stop using
> request_firmware_nowait() in probe path but rather have device core fire
> off probe asynchronously.
>
> I'd rather have fix for input device freeing be separate from
> sysfs/firmware/config loading changes.
I agree, it is better to fix the common issue with a straightforward patch.
I have split it apart and will send this patch now.
next prev parent reply other threads:[~2014-09-10 14:31 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-09 14:50 atmel_mxt_ts fixes nick.dyer
2014-09-09 14:50 ` [PATCH 1/2] Input: atmel_mxt_ts - downgrade warning about empty interrupts nick.dyer
2014-09-09 23:40 ` Dmitry Torokhov
2014-09-09 14:50 ` [PATCH 2/2] Input: atmel_mxt_ts - fix double free of input device nick.dyer
2014-09-09 23:49 ` Dmitry Torokhov
2014-09-10 14:31 ` Nick Dyer [this message]
2014-09-10 14:33 ` [PATCH 2/2 v2] " nick.dyer
2014-09-10 17:28 ` Stephen Warren
2014-09-10 18:07 ` Dmitry Torokhov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=541060D8.9020707@itdev.co.uk \
--to=nick.dyer@itdev.co.uk \
--cc=Alan.Bowens@atmel.com \
--cc=bleung@chromium.org \
--cc=djkurtz@chromium.org \
--cc=dmitry.torokhov@gmail.com \
--cc=jy0922.shim@samsung.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=miletus@google.com \
--cc=nsekhar@ti.com \
--cc=olofj@chromium.org \
--cc=pmeerw@pmeerw.net \
--cc=rydberg@euromail.se \
--cc=swarren@wwwdotorg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox