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] [day] [month] [year] [list]
Date:   Fri, 12 Apr 2019 13:28:58 +0000
From:   Ido Schimmel <idosch@...lanox.com>
To:     Vlad Buslov <vladbu@...lanox.com>
CC:     "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "jhs@...atatu.com" <jhs@...atatu.com>,
        "xiyou.wangcong@...il.com" <xiyou.wangcong@...il.com>,
        "jiri@...nulli.us" <jiri@...nulli.us>,
        "davem@...emloft.net" <davem@...emloft.net>,
        "idosch@...sch.org" <idosch@...sch.org>
Subject: Re: [PATCH net-next] net: sched: flower: fix filter net reference
 counting

On Fri, Apr 12, 2019 at 12:54:19AM +0300, Vlad Buslov wrote:
> Fix net reference counting in fl_change() and remove redundant call to
> tcf_exts_get_net() from __fl_delete(). __fl_put() already tries to get net
> before releasing exts and deallocating a filter, so this code caused flower
> classifier to obtain net twice per filter that is being deleted.
> 
> Implementation of __fl_delete() called tcf_exts_get_net() to pass its
> result as 'async' flag to fl_mask_put(). However, 'async' flag is redundant
> and only complicates fl_mask_put() implementation. This functionality seems
> to be copied from filter cleanup code, where it was added by Cong with
> following explanation:
> 
>     This patchset tries to fix the race between call_rcu() and
>     cleanup_net() again. Without holding the netns refcnt the
>     tc_action_net_exit() in netns workqueue could be called before
>     filter destroy works in tc filter workqueue. This patchset
>     moves the netns refcnt from tc actions to tcf_exts, without
>     breaking per-netns tc actions.
> 
> This doesn't apply to flower mask, which doesn't call any tc action code
> during cleanup. Simplify fl_mask_put() by removing the flag parameter and
> always use tcf_queue_work() to free mask objects.
> 
> Fixes: 061775583e35 ("net: sched: flower: introduce reference counting for filters")
> Fixes: 1f17f7742eeb ("net: sched: flower: insert filter to ht before offloading it to hw")
> Fixes: 05cd271fd61a ("cls_flower: Support multiple masks per priority")
> Reported-by: Ido Schimmel <idosch@...lanox.com>
> Signed-off-by: Vlad Buslov <vladbu@...lanox.com>

I see the patch was already applied, but FWIW:

Tested-by: Ido Schimmel <idosch@...lanox.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ