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]
Date:	Thu, 25 Nov 2010 15:17:58 +0300
From:	Sergei Shtylyov <sshtylyov@...sta.com>
To:	Filip Aben <f.aben@...ion.com>
CC:	davem@...emloft.net, linux-usb@...r.kernel.org,
	netdev@...r.kernel.org, jhovold@...il.com, pki@...com.pl,
	j.dumon@...ion.com
Subject: Re: [PATCH] hso: fix disable_net

On 24-11-2010 22:35, Filip Aben wrote:

> The HSO driver incorrectly creates a serial device instead of a net
> device when disable_net is set. It shouldn't create anything for the
> network interface.

> Signed-off-by: Filip Aben <f.aben@...ion.com>
> ---

> diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c
> index b154a94..b05c235 100644
> --- a/drivers/net/usb/hso.c
> +++ b/drivers/net/usb/hso.c
> @@ -2994,10 +2994,10 @@ static int hso_probe(struct usb_interface *interface,
>
>   	case HSO_INTF_BULK:
>   		/* It's a regular bulk interface */
> -		if (((port_spec&  HSO_PORT_MASK) == HSO_PORT_NETWORK)&&
> -		    !disable_net)
> +		if ((port_spec&  HSO_PORT_MASK) == HSO_PORT_NETWORK) {
> +		    if(!disable_net)
>   			hso_dev = hso_create_net_device(interface, port_spec);
> -		else
> +		} else

    There should now be {} on the *else* branch too, according to CodingStyle.

>   			hso_dev =
>   			    hso_create_bulk_serial_device(interface, port_spec);
>   		if (!hso_dev)

WBR, Sergei
--
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