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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAM_iQpUmjmHsO8Bc2OHskpe=0B1coEetQqvR2C75jU2hG5QVzg@mail.gmail.com>
Date:   Mon, 3 Sep 2018 10:43:59 -0700
From:   Cong Wang <xiyou.wangcong@...il.com>
To:     Vlad Buslov <vladbu@...lanox.com>
Cc:     Linux Kernel Network Developers <netdev@...r.kernel.org>,
        Jamal Hadi Salim <jhs@...atatu.com>,
        Jiri Pirko <jiri@...nulli.us>,
        David Miller <davem@...emloft.net>
Subject: Re: [PATCH net-next] net: sched: action_ife: take reference to meta module

On Mon, Sep 3, 2018 at 12:10 AM Vlad Buslov <vladbu@...lanox.com> wrote:
>
> Recent refactoring of add_metainfo() caused use_all_metadata() to add
> metainfo to ife action metalist without taking reference to module. This
> causes warning in module_put called from ife action cleanup function.
>
> Implement add_metainfo_and_get_ops() function that returns with reference
> to module taken if metainfo was added successfully, and call it from
> use_all_metadata(), instead of calling __add_metainfo() directly.
>
...
>
> Fixes: 5ffe57da29b3 ("act_ife: fix a potential deadlock")
> Signed-off-by: Vlad Buslov <vladbu@...lanox.com>

This patch should be applied to -net rather than -net-next.

Acked-by: Cong Wang <xiyou.wangcong@...il.com>

One nit below.

>  static int add_metainfo(struct tcf_ife_info *ife, u32 metaid, void *metaval,
>                         int len, bool exists)
>  {
> @@ -349,7 +364,8 @@ static int use_all_metadata(struct tcf_ife_info *ife, bool exists)
>
>         read_lock(&ife_mod_lock);
>         list_for_each_entry(o, &ifeoplist, list) {
> -               rc = __add_metainfo(o, ife, o->metaid, NULL, 0, true, exists);
> +               rc = add_metainfo_and_get_ops(o, ife, o->metaid, NULL, 0, true,
> +                                             exists);

Nit: you can fold constants into this helper as it only has one caller.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ