[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZdzY0OZIsRqmi41A@slm.duckdns.org>
Date: Mon, 26 Feb 2024 08:30:40 -1000
From: Tejun Heo <tj@...nel.org>
To: Boqun Feng <boqun.feng@...il.com>
Cc: jiangshanlai@...il.com, torvalds@...ux-foundation.org,
linux-kernel@...r.kernel.org, allen.lkml@...il.com,
kernel-team@...a.com
Subject: Re: [PATCH 12/17] workqueue: Implement disable/enable for (delayed)
work items
Hello,
On Sun, Feb 25, 2024 at 07:42:27PM -0800, Boqun Feng wrote:
> > +bool enable_work(struct work_struct *work)
> > +{
> > + struct work_offq_data offqd;
> > + unsigned long irq_flags;
> > +
> > + work_grab_pending(work, 0, &irq_flags);
> > +
> > + work_offqd_unpack(&offqd, *work_data_bits(work));
> > + work_offqd_enable(&offqd);
> > + set_work_pool_and_clear_pending(work, offqd.pool_id,
> > + work_offqd_pack_flags(&offqd));
> > + local_irq_enable();
>
> Maybe
> local_irq_restore(irq_flags);
>
> ?
>
> Because in a later patch, you make this funciton callable in any
> context, so it may be called with irq disabled.
Yeah, Lai already pointed that out. Will send out an updated patchset later.
Thanks.
--
tejun
Powered by blists - more mailing lists