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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sat, 13 Feb 2021 11:07:04 -0800
From:   Cong Wang <xiyou.wangcong@...il.com>
To:     Taehee Yoo <ap420073@...il.com>
Cc:     David Miller <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Linux Kernel Network Developers <netdev@...r.kernel.org>,
        jwi@...ux.ibm.com, kgraul@...ux.ibm.com, hca@...ux.ibm.com,
        gor@...ux.ibm.com, borntraeger@...ibm.com,
        Marek Lindner <mareklindner@...mailbox.ch>,
        sw@...onwunderlich.de, a@...table.cc, sven@...fation.org,
        Hideaki YOSHIFUJI <yoshfuji@...ux-ipv6.org>, dsahern@...nel.org
Subject: Re: [PATCH net-next v2 1/7] mld: convert from timer to delayed work

On Sat, Feb 13, 2021 at 9:51 AM Taehee Yoo <ap420073@...il.com> wrote:
> -static void mld_dad_start_timer(struct inet6_dev *idev, unsigned long delay)
> +static void mld_dad_start_work(struct inet6_dev *idev, unsigned long delay)
>  {
>         unsigned long tv = prandom_u32() % delay;
>
> -       if (!mod_timer(&idev->mc_dad_timer, jiffies+tv+2))
> +       if (!mod_delayed_work(mld_wq, &idev->mc_dad_work, msecs_to_jiffies(tv + 2)))

IIUC, before this patch 'delay' is in jiffies, after this patch it is in msecs?

[...]

> -static void mld_dad_timer_expire(struct timer_list *t)
> +static void mld_dad_work(struct work_struct *work)
>  {
> -       struct inet6_dev *idev = from_timer(idev, t, mc_dad_timer);
> +       struct inet6_dev *idev = container_of(to_delayed_work(work),
> +                                             struct inet6_dev,
> +                                             mc_dad_work);
>
> +       rtnl_lock();

Any reason why we need RTNL after converting the timer to
delayed work?

Thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ