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]
Message-ID: <ca0871f61dfa85d98f218db8e3dd5178@coraid.com>
Date:	Wed, 18 Nov 2009 11:49:03 -0500
From:	Ed Cashin <ecashin@...aid.com>
To:	shemminger@...tta.com, karaluh@...aluh.pl, ecashin@...aid.com,
	roel.kluin@...il.com, harvey.harrison@...il.com,
	bzolnier@...il.com, netdev@...r.kernel.org
Subject: Re: [PATCH 04/10] AOE: use rcu to find network device

On Tue Nov 10 18:53:43 EST 2009, shemminger@...tta.com wrote:

...
> --- a/drivers/block/aoe/aoecmd.c	2009-11-10 15:13:25.673859220 -0800
> +++ b/drivers/block/aoe/aoecmd.c	2009-11-10 15:49:20.009047132 -0800
...
> @@ -424,12 +426,29 @@ static void
>  ejectif(struct aoetgt *t, struct aoeif *ifp)
>  {
>  	struct aoeif *e;
> +	struct net_device *nd;
>  	ulong n;
>  
>  	e = t->ifs + NAOEIFS - 1;
> +	nd = e->nd;
>  	n = (e - ifp) * sizeof *ifp;
>  	memmove(ifp, ifp+1, n);
>  	e->nd = NULL;
> +	dev_put(nd);
> +}

I didn't notice this before, but e->nd will be the net_device pointer
from the last ifp in the allocated array, whether it's NULL or not,
and usually won't be ifp->nd, the one we need to give to dev_put.  I
think that's why I see an oops when testing the version of the patch
that I sent last.  The test is doing rmmod on the interface that's
being used to create an ext2 fs on an AoE target.

I'll use ifp->nd instead of e->nd and test again tomorrow.  I have to
step away from the computer today.

-- 
  Ed
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ