lkml.org 
[lkml]   [2024]   [Feb]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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

\
 
 \ /
  Last update: 2024-05-27 15:22    [W:0.183 / U:0.304 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site