From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Nick Dyer <nick@shmanahar.org>
Cc: linux-input@vger.kernel.org,
Benjamin Tissoires <benjamin.tissoires@redhat.com>,
Andrew Duggan <aduggan@synaptics.com>,
Christopher Heiny <cheiny@synaptics.com>,
linux-kernel@vger.kernel.org, Chris Healy <cphealy@gmail.com>
Subject: Re: [PATCH] Input: synaptics-rmi4 - create firmware update sysfs attribute in F34
Date: Sun, 12 Feb 2017 16:02:51 -0800 [thread overview]
Message-ID: <20170213000251.GA528@dtor-ws> (raw)
In-Reply-To: <20170212225056.GB17938@lava.h.shmanahar.org>
Hi Nick,
On Sun, Feb 12, 2017 at 10:50:56PM +0000, Nick Dyer wrote:
> On Thu, Feb 09, 2017 at 01:25:08PM -0800, Dmitry Torokhov wrote:
> > There is no need to create sysfs attributes in the main driver core,
> > let F34 implementation do that.
>
> Hi Dmitry-
>
> I haven't tested this yet, but I did try creating/removing the sysfs
> entries in the f34 function probe/remove as you're suggesting when I
> wrote the F34 support.
>
> The problem is that when we do a firmware update, we have to tear down
> the function list (because most of the functions are not there during
> firmware update and they may in fact come back different). Which removes
> the sysfs entries, meaning it's rather like sawing off the branch you're
> sitting on, and it crashes almost immediately. I couldn't think of a
> cleaner way to solve it that the current implementation.
Oh, I see. Well, that means that the current implementation is quite
broken, as you'll end up referencing freed and potentially reused memory
after firmware update. It looks like we'll need to make sure we do not
reference F34 memory unless we know it is there. That means we'll have
to pull update status and FW update mutex into the RMI device itself as
it is something that stays around even if we destroy and rebuild
function list.
Thanks.
--
Dmitry
next prev parent reply other threads:[~2017-02-13 0:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-09 21:25 [PATCH] Input: synaptics-rmi4 - create firmware update sysfs attribute in F34 Dmitry Torokhov
2017-02-12 22:50 ` Nick Dyer
2017-02-13 0:02 ` Dmitry Torokhov [this message]
2017-02-13 21:41 ` Nick Dyer
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=20170213000251.GA528@dtor-ws \
--to=dmitry.torokhov@gmail.com \
--cc=aduggan@synaptics.com \
--cc=benjamin.tissoires@redhat.com \
--cc=cheiny@synaptics.com \
--cc=cphealy@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nick@shmanahar.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;
as well as URLs for NNTP newsgroup(s).