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:	Tue, 16 Sep 2014 00:15:29 -0500
From:	Felipe Balbi <balbi@...com>
To:	Peter Chen <peter.chen@...escale.com>
CC:	Andreas Larsson <andreas@...sler.com>, Felipe Balbi <balbi@...com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	<linux-usb@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
	<software@...sler.com>
Subject: Re: [PATCH] usb: gadget: udc_core: Use right kobj when calling
 sysfs_notify

Hi,

On Tue, Sep 16, 2014 at 10:02:25AM +0800, Peter Chen wrote:
> On Mon, Sep 15, 2014 at 12:42:27PM +0200, Andreas Larsson wrote:
> > The state attribute is connected to the kobj of the udc, not the gadget.
> > 
> > Signed-off-by: Andreas Larsson <andreas@...sler.com>
> > ---
> >  drivers/usb/gadget/udc/udc-core.c |   14 +++++++++++++-
> >  1 file changed, 13 insertions(+), 1 deletion(-)
> > 
> > diff --git a/drivers/usb/gadget/udc/udc-core.c b/drivers/usb/gadget/udc/udc-core.c
> > index b0d9817..37c129a 100644
> > --- a/drivers/usb/gadget/udc/udc-core.c
> > +++ b/drivers/usb/gadget/udc/udc-core.c
> > @@ -109,8 +109,20 @@ EXPORT_SYMBOL_GPL(usb_gadget_unmap_request);
> >  static void usb_gadget_state_work(struct work_struct *work)
> >  {
> >  	struct usb_gadget	*gadget = work_to_gadget(work);
> > +	struct usb_udc		*udc = NULL;
> > +
> > +	mutex_lock(&udc_lock);
> > +	list_for_each_entry(udc, &udc_list, list)
> > +		if (udc->gadget == gadget)
> > +			goto found;
> > +	mutex_unlock(&udc_lock);
> > +
> > +	return;
> > +
> > +found:
> > +	mutex_unlock(&udc_lock);
> >  
> > -	sysfs_notify(&gadget->dev.kobj, NULL, "state");
> > +	sysfs_notify(&udc->dev.kobj, NULL, "state");
> >  }
> >  
> >  void usb_gadget_set_state(struct usb_gadget *gadget,
> 
> What's the user mode difference with and without this patch?

poll() will actually wakeup ?

-- 
balbi

Download attachment "signature.asc" of type "application/pgp-signature" (820 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ