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]
Date:	Tue, 4 Mar 2014 14:42:08 -0500 (EST)
From:	Alan Stern <stern@...land.harvard.edu>
To:	Valentina Manea <valentina.manea.m@...il.com>
cc:	gregkh@...uxfoundation.org, <ly80toro@....cs.fau.de>,
	<ke42caxa@....cs.fau.de>, <eladwexler77@...oo.com>,
	<oat.elena@...il.com>, <josh@...htriplett.org>,
	<himangi774@...il.com>, <linux-usb@...r.kernel.org>,
	<devel@...verdev.osuosl.org>, <linux-kernel@...r.kernel.org>,
	<andy.grover@...il.com>, <firefly@...ts.rosedu.org>
Subject: Re: [PATCH] staging: usbip: claim ports used by shared devices

On Tue, 4 Mar 2014, Valentina Manea wrote:

> diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c
> index 90e18f6..a91dc1f 100644
> --- a/drivers/usb/core/devio.c
> +++ b/drivers/usb/core/devio.c
> @@ -62,23 +62,6 @@
>  /* Mutual exclusion for removal, open, and release */
>  DEFINE_MUTEX(usbfs_mutex);
>  
> -struct dev_state {
> -	struct list_head list;      /* state list */
> -	struct usb_device *dev;
> -	struct file *file;
> -	spinlock_t lock;            /* protects the async urb lists */
> -	struct list_head async_pending;
> -	struct list_head async_completed;
> -	wait_queue_head_t wait;     /* wake up if a request completed */
> -	unsigned int discsignr;
> -	struct pid *disc_pid;
> -	const struct cred *cred;
> -	void __user *disccontext;
> -	unsigned long ifclaimed;
> -	u32 secid;
> -	u32 disabled_bulk_eps;
> -};
> -

Don't remove this definition.

> diff --git a/include/linux/usb.h b/include/linux/usb.h
> index 22de4af..e0843a4 100644
> --- a/include/linux/usb.h
> +++ b/include/linux/usb.h
> @@ -366,6 +366,24 @@ struct usb_bus {
>  #endif
>  };
>  
> +struct dev_state {
> +	struct list_head list;      /* state list */
> +	struct usb_device *dev;
> +	struct file *file;
> +	spinlock_t lock;            /* protects the async urb lists */
> +	struct list_head async_pending;
> +	struct list_head async_completed;
> +	wait_queue_head_t wait;     /* wake up if a request completed */
> +	unsigned int discsignr;
> +	struct pid *disc_pid;
> +	const struct cred *cred;
> +	void __user *disccontext;
> +	unsigned long ifclaimed;
> +	u32 secid;
> +	u32 disabled_bulk_eps;
> +};

And don't put this here.  Instead, just put

struct dev_state;

Alan Stern

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