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]
Date:   Fri, 22 Feb 2019 10:03:25 -0500
From:   David Ahern <dsahern@...il.com>
To:     wenxu <wenxu@...oud.cn>, davem@...emloft.net,
        netdev@...r.kernel.org
Subject: Re: [PATCH net-next v2] ip_tunnel: Add dst_cache management
 lwtunnel_state of ip tunnel

On 2/21/19 11:14 PM, wenxu wrote:
> build_state in the rcu_read_lock and disable the preempt
> 
>  rcu_read_lock();
>     ops = rcu_dereference(lwtun_encaps[encap_type]);
>     if (likely(ops && ops->build_state && try_module_get(ops->owner))) {
>         found = true;
>         ret = ops->build_state(encap, family, cfg, lws, extack);
>         if (ret)
>             module_put(ops->owner);
>     }  
>     rcu_read_unlock();
> 

Missed that.

Once a reference is taken the rcu_read_lock can be dropped before
calling build_state allowing the allocations to be GFP_KERNEL.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ