lkml.org 
[lkml]   [2022]   [Nov]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v2 2/2] leds: trigger: pattern: notify usespace if pattern finished
On Mon, Nov 21, 2022 at 2:44 PM Martin Kurbanov
<MMKurbanov@sberdevices.ru> wrote:
> On 21.11.2022 15:38, Martin Kurbanov wrote:

> In the previous patch series feedback you mentioned two main problems:
> sysfs node creation time and life cycle, and sysfs node creation method.
> Let me explain why I didn't fix the above items.
>
> 1) About sysfs node creation time and its life cycle. In my opinion,
> sysfs node should exist only when user has activated pattern explicitly;
> otherwise, it will mislead potential user in the case when pattern is
> not activated, but sysfs node existed.

OK.

> 2) About pattern_trig_attrs. We need to use sysfs_notify_dirent()
> instead of sysfs_notify(), cause sysfs_notify() can sleep on the lock,
> but it's not acceptable for the pattern code in the timer context.
> Considering this, we have to create sysfs node in the
> pattern_trig_activate() directly and retrieve kernfs_node for required
> sysfs_notify_dirent() routine.

Is there a guarantee that nobody is using the removed node?
If no, what would be the problems with that if any?

--
With Best Regards,
Andy Shevchenko

\
 
 \ /
  Last update: 2022-11-21 14:26    [W:0.074 / U:0.304 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site