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: <20110609120358.550fcc06@notabene.brown>
Date:	Thu, 9 Jun 2011 12:03:58 +1000
From:	NeilBrown <neilb@...e.de>
To:	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
Cc:	linux-kernel@...r.kernel.org, mingo@...e.hu, laijs@...fujitsu.com,
	dipankar@...ibm.com, akpm@...ux-foundation.org,
	mathieu.desnoyers@...ymtl.ca, josh@...htriplett.org,
	niv@...ibm.com, tglx@...utronix.de, peterz@...radead.org,
	rostedt@...dmis.org, Valdis.Kletnieks@...edu, dhowells@...hat.com,
	eric.dumazet@...il.com, darren@...art.com, patches@...aro.org
Subject: Re: [PATCH tip/core/rcu 19/28] md,rcu: Convert call_rcu(free_conf)
 to kfree_rcu()

On Wed,  8 Jun 2011 12:29:58 -0700 "Paul E. McKenney"
<paulmck@...ux.vnet.ibm.com> wrote:

> From: Lai Jiangshan <laijs@...fujitsu.com>
> 
> The rcu callback free_conf() just calls a kfree(),
> so we use kfree_rcu() instead of the call_rcu(free_conf).
> 
> Signed-off-by: Lai Jiangshan <laijs@...fujitsu.com>
> Signed-off-by: Paul E. McKenney <paulmck@...ux.vnet.ibm.com>
> Cc: Neil Brown <neilb@...e.de>
> Reviewed-by: Josh Triplett <josh@...htriplett.org>

Acked-by: NeilBrown <neilb@...e.de>

Please submit this yourself - I won't be touching that area of code at all.

Thanks,
NeilBrown


> ---
>  drivers/md/linear.c |    8 +-------
>  1 files changed, 1 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/md/linear.c b/drivers/md/linear.c
> index abfb59a..6cd2c31 100644
> --- a/drivers/md/linear.c
> +++ b/drivers/md/linear.c
> @@ -213,12 +213,6 @@ static int linear_run (mddev_t *mddev)
>  	return md_integrity_register(mddev);
>  }
>  
> -static void free_conf(struct rcu_head *head)
> -{
> -	linear_conf_t *conf = container_of(head, linear_conf_t, rcu);
> -	kfree(conf);
> -}
> -
>  static int linear_add(mddev_t *mddev, mdk_rdev_t *rdev)
>  {
>  	/* Adding a drive to a linear array allows the array to grow.
> @@ -247,7 +241,7 @@ static int linear_add(mddev_t *mddev, mdk_rdev_t *rdev)
>  	md_set_array_sectors(mddev, linear_size(mddev, 0, 0));
>  	set_capacity(mddev->gendisk, mddev->array_sectors);
>  	revalidate_disk(mddev->gendisk);
> -	call_rcu(&oldconf->rcu, free_conf);
> +	kfree_rcu(oldconf, rcu);
>  	return 0;
>  }
>  

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ