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] [day] [month] [year] [list]
Message-ID: <20121201214902.GA10513@electric-eye.fr.zoreil.com>
Date:	Sat, 1 Dec 2012 22:49:02 +0100
From:	Francois Romieu <romieu@...zoreil.com>
To:	John Greene <jogreene@...hat.com>
Cc:	netdev@...r.kernel.org, "David S. Miller" <davem@...emloft.net>
Subject: Re: [RFT PATCH] 8139cp: properly support change of MTU values

John Greene <jogreene@...hat.com> :
[...]
> Testing: has been test on virtual 8139cp setup without issue,
> have no access real hardware 8139cp, need testing help.

You should Cc: David Woodhouse <dwmw2@...radead.org> for testing.

[...]
> diff --git a/drivers/net/ethernet/realtek/8139cp.c b/drivers/net/ethernet/realtek/8139cp.c
> index 6cb96b4..7847c83 100644
> --- a/drivers/net/ethernet/realtek/8139cp.c
> +++ b/drivers/net/ethernet/realtek/8139cp.c
[...]
> @@ -1244,22 +1241,11 @@ static int cp_change_mtu(struct net_device *dev, int new_mtu)
>  		return 0;
>  	}
>  
> -	spin_lock_irqsave(&cp->lock, flags);
> -
> -	cp_stop_hw(cp);			/* stop h/w and free rings */
> -	cp_clean_rings(cp);
> -
> +	/* network IS up, close it, reset MTU, and come up again. */
> +	cp_close(dev);
>  	dev->mtu = new_mtu;
> -	cp_set_rxbufsize(cp);		/* set new rx buf size */
> -
> -	rc = cp_init_rings(cp);		/* realloc and restart h/w */
> -	cp_start_hw(cp);
> -
> -	spin_unlock_irqrestore(&cp->lock, flags);
> -
> -	return rc;
> +	return cp_open(dev);

netif_running is true since cp_close() is not running from dev_close.
Bad things will happen if cp_open fails while cp_interrupt was waiting
for the lock.

-- 
Ueimor
--
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