mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: kr494167@gmail.com
Cc: andy.shevchenko@gmail.com, andy@kernel.org, geert@linux-m68k.org,
	chris.packham@alliedtelesis.co.nz, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/3 3/3] auxdisplay: max6959: fix work initialization race and convert to devm_linedisp_register()
Date: Wed, 19 Aug 2026 10:50:47 +0300	[thread overview]
Message-ID: <aoVgV0LwBVFSHYof@ashevche-desk.local> (raw)
In-Reply-To: <20260819024556.63534-4-kr494167@gmail.com>

On Wed, Aug 19, 2026 at 08:15:56AM +0530, kr494167@gmail.com wrote:

> INIT_DELAYED_WORK(&priv->work, max6959_disp_update) was previously called
> inside max6959_linedisp_get_map_type(), which is invoked during/after
> linedisp_register(). Initializing a delayed_work structure inside a map
> query callback can re-initialize an active work item or race with
> max6959_linedisp_update().
> 
> In addition, max6959_i2c_remove() called cancel_delayed_work_sync() before
> linedisp_unregister(&priv->linedisp), allowing sysfs updates to
> reschedule work after cancel_delayed_work_sync() completed.
> 
> Fix these by moving INIT_DELAYED_WORK() to probe(), using
> devm_add_action_or_reset() for work cancellation, and converting to
> devm_linedisp_register(). Registering devm_linedisp_register() after
> work cancellation action ensures proper LIFO teardown order, allowing
> max6959_i2c_remove() to be removed entirely.

Use devm_delayed_work_autocancel() from devm-helpers.h.

Also try to squeeze this most likely AI-assisted commit message to the point.

...

Same comment to the other fix-patch.

-- 
With Best Regards,
Andy Shevchenko



      reply	other threads:[~2026-08-19  7:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-19  2:45 [PATCH 0/3] auxdisplay: add devm_linedisp_register() and fix work initialization races kr494167
2026-08-19  2:45 ` [PATCH 0/3 1/3] auxdisplay: line-display: add devm_linedisp_register() kr494167
2026-08-19  8:01   ` Andy Shevchenko
2026-08-19  2:45 ` [PATCH 0/3 2/3] auxdisplay: seg-led-gpio: fix work initialization race and convert to devm_linedisp_register() kr494167
2026-08-19  2:45 ` [PATCH 0/3 3/3] auxdisplay: max6959: " kr494167
2026-08-19  7:50   ` Andy Shevchenko [this message]

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=aoVgV0LwBVFSHYof@ashevche-desk.local \
    --to=andriy.shevchenko@intel.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=andy@kernel.org \
    --cc=chris.packham@alliedtelesis.co.nz \
    --cc=geert@linux-m68k.org \
    --cc=kr494167@gmail.com \
    --cc=linux-kernel@vger.kernel.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

all inboxes | Powered by JetHome®