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]
Message-ID: <YbpFfsTvB96g4+yU@pc638.lan>
Date:   Wed, 15 Dec 2021 20:43:58 +0100
From:   Uladzislau Rezki <urezki@...il.com>
To:     Lee Jones <lee.jones@...aro.org>,
        Mike Marciniszyn <mike.marciniszyn@...nelisnetworks.com>
Cc:     LKML <linux-kernel@...r.kernel.org>, RCU <rcu@...r.kernel.org>,
        "Paul E . McKenney" <paulmck@...nel.org>,
        Michal Hocko <mhocko@...e.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Daniel Axtens <dja@...ens.net>,
        Frederic Weisbecker <frederic@...nel.org>,
        Neeraj Upadhyay <neeraju@...eaurora.org>,
        Joel Fernandes <joel@...lfernandes.org>,
        Peter Zijlstra <peterz@...radead.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        "Theodore Y . Ts'o" <tytso@....edu>,
        Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
        Oleksiy Avramchenko <oleksiy.avramchenko@...ymobile.com>
Subject: Re: [PATCH] mfd: dln2: Switch to kvfree_rcu() API

On Wed, Dec 15, 2021 at 12:18:41PM +0100, Uladzislau Rezki (Sony) wrote:
> Instead of invoking a synchronize_rcu() to free a pointer
> after a grace period we can directly make use of new API
> that does the same but in more efficient way.
> 
> TO: Lee Jones <lee.jones@...aro.org>
> TO: Mike Marciniszyn <mike.marciniszyn@...nelisnetworks.com>
> Signed-off-by: Uladzislau Rezki (Sony) <urezki@...il.com>
> ---
>  drivers/mfd/dln2.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/mfd/dln2.c b/drivers/mfd/dln2.c
> index 852129ea0766..365e3e77cac4 100644
> --- a/drivers/mfd/dln2.c
> +++ b/drivers/mfd/dln2.c
> @@ -179,10 +179,8 @@ void dln2_unregister_event_cb(struct platform_device *pdev, u16 id)
>  
>  	spin_unlock_irqrestore(&dln2->event_cb_lock, flags);
>  
> -	if (found) {
> -		synchronize_rcu();
> -		kfree(i);
> -	}
> +	if (found)
> +		kvfree_rcu(i);
>  }
>  EXPORT_SYMBOL(dln2_unregister_event_cb);
>  
> -- 
> 2.30.2
> 
+ Lee Jones <lee.jones@...aro.org>                                                                                                                                                     
+ Mike Marciniszyn <mike.marciniszyn@...nelisnetworks.com>

--
Vlad Rezki

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ