lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Wed, 12 May 2021 13:32:21 +0200
From:   "Rafael J. Wysocki" <rafael@...nel.org>
To:     Hillf Danton <hdanton@...a.com>
Cc:     "Rafael J. Wysocki" <rafael@...nel.org>,
        Saravana Kannan <saravanak@...gle.com>,
        "Rafael J. Wysocki" <rjw@...ysocki.net>,
        "chenxiang (M)" <chenxiang66@...ilicon.com>,
        "Rafael J. Wysocki" <rafael.j.wysocki@...el.com>,
        John Garry <john.garry@...wei.com>,
        "scsi list : TARGET SUBSYSTEM" <linux-scsi@...r.kernel.org>,
        linux-kernel <linux-kernel@...r.kernel.org>,
        Linux PM <linux-pm@...r.kernel.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Subject: Re: Qestion about device link

On Wed, May 12, 2021 at 8:38 AM Hillf Danton <hdanton@...a.com> wrote:
>
> On Tue, 11 May 2021 21:43:40 Rafael J. Wysocki  wrote:
> > >  #ifdef CONFIG_SRCU
> > > +static void __device_link_free_fn(struct work_struct *work)
> > > +{
> > > +       device_link_free(container_of(work, struct device_link, srcu.work));
> > > +}
> > > +
> > >  static void __device_link_free_srcu(struct rcu_head *rhead)
> > >  {
> > > -       device_link_free(container_of(rhead, struct device_link, rcu_head));
> > > +       struct device_link *link = container_of(rhead, struct device_link,
> > > +                                               srcu.rhead);
> > > +       struct work_struct *work = &link->srcu.work;
> > > +
> > > +       /*
> > > +        * Because device_link_free() may sleep in some cases, schedule the
> > > +        * execution of it instead of invoking it directly.
> > > +        */
> > > +       INIT_WORK(work, __device_link_free_fn);
> > > +       schedule_work(work);
> > >  }
>
> Nope, you need something like queue_work(system_unbound_wq, work); instead
> because of the blocking wq callback.

system_long_wq rather, as it really doesn't matter when it gets completed.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ