[rds-devel] Re: [PATCH 2/2] RDS: Fix a crash on rmmod

Vladimir Sokolovsky vlad at mellanox.co.il
Wed Nov 14 23:32:00 PST 2007


Hi Olaf,
I removed this code from ofed_1_2_c, it was commited by mistake. It was 
untested version.
Please pull ofed_1_2_c again,
Sorry.

I will apply your patch to ofed_1_3/linux-2.6.git.

Regards,
Vladimir

On Thursday 15 November 2007 08:58:44 Olaf Kirch wrote:
> On Wednesday 14 November 2007 19:14, Olaf Kirch wrote:
> > From: Olaf Kirch <olaf.kirch at oracle.com>
> >
> > RDS: Fix a crash on rmmod
> >
> > This fixes a crash in rds_ib_remove_one - we really should
> > be using list_for_each_entry_safe here.
>
> I just noticed that the same change (introducing rds_ib_{add,remove}_one
> is in ofed 1.2c, too. So a similar patch needs to be applied there
> as well.
>
> Olaf
> --
> Olaf Kirch  |  --- o --- Nous sommes du soleil we love when we play
> okir at lst.de |    / | \   sol.dhoop.naytheet.ah kin.ir.samse.qurax
> ----------------
> From 3f4f3d8ecde3fb890ded335a2e95ab535e05c542 Mon Sep 17 00:00:00 2001
> From: Olaf Kirch <olaf.kirch at oracle.com>
> Date: Thu, 15 Nov 2007 07:57:11 +0100
> Subject: [PATCH] RDS: Fix a crash on rmmod
>
> This fixes a crash in rds_ib_remove_one - we really should
> be using list_for_each_entry_safe here.
>
> Signed-off-by: Olaf Kirch <olaf.kirch at oracle.com>
> ---
>  net/rds/ib.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/net/rds/ib.c b/net/rds/ib.c
> index 55a7821..acb7b88 100644
> --- a/net/rds/ib.c
> +++ b/net/rds/ib.c
> @@ -70,11 +70,11 @@ void rds_ib_add_one(struct ib_device *de
>  void rds_ib_remove_one(struct ib_device *device)
>  {
>  	struct rds_ib_device *rds_ibdev;
> -	struct rds_ib_dev_conn *i_conn;
> +	struct rds_ib_dev_conn *i_conn, *next;
>
>  	rds_ibdev = ib_get_client_data(device, &rds_ib_client);
>
> -	list_for_each_entry(i_conn, &rds_ibdev->conn_list, list) {
> +	list_for_each_entry_safe(i_conn, next, &rds_ibdev->conn_list, list) {
>  		if (i_conn->conn)
>  			rds_conn_drop(i_conn->conn);
>  		list_del(&i_conn->list);





More information about the rds-devel mailing list