Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1579328

Re: [PATCH] Input: synaptics-rmi4 - create firmware update sysfs attribute in F34

From Dmitry Torokhov <dmitry.torokhov@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH] Input: synaptics-rmi4 - create firmware update sysfs attribute in F34
Date 2017-02-13 01:10 +0100
Message-ID <tacnn-4ym-1@gated-at.bofh.it> (permalink)
References <t94rT-2U0-17@gated-at.bofh.it> <tabhE-3H6-33@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH] Input: synaptics-rmi4 - create firmware update sysfs  attribute in F34 Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2017-02-09 22:30 +0100
  Re: [PATCH] Input: synaptics-rmi4 - create firmware update sysfs  attribute in F34 Nick Dyer <nick@shmanahar.org> - 2017-02-13 00:00 +0100
    Re: [PATCH] Input: synaptics-rmi4 - create firmware update sysfs  attribute in F34 Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2017-02-13 01:10 +0100

csiph-web