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]
Message-ID: <20150522101637.GB26704@kuha.fi.intel.com>
Date:	Fri, 22 May 2015 13:16:38 +0300
From:	Heikki Krogerus <heikki.krogerus@...ux.intel.com>
To:	Sasha Levin <sasha.levin@...cle.com>
Cc:	"Lu, Baolu" <baolu.lu@...ux.intel.com>,
	David Cohen <david.a.cohen@...ux.intel.com>,
	gregkh@...uxfoundation.org, linux-usb@...r.kernel.org,
	linux-kernel@...r.kernel.org, balbi@...com
Subject: Re: [PATCH] usb: ulpi: don't register drivers if bus doesn't exist

> > >>diff --git a/drivers/usb/common/ulpi.c b/drivers/usb/common/ulpi.c
> > >>index 0e6f968..0b0a5e7 100644
> > >>--- a/drivers/usb/common/ulpi.c
> > >>+++ b/drivers/usb/common/ulpi.c
> > >>@@ -132,6 +132,10 @@ int ulpi_register_driver(struct ulpi_driver *drv)
> > >>  	if (!drv->probe)
> > >>  		return -EINVAL;
> > >>+	/* Was the bus registered successfully? */
> > >>+	if (!ulpi_bus.p)
> > >>+		return -ENODEV;
> 
> I think we need to warn in this case. How about:
> 
>         if (unlikely(WARN_ON(!ulpi_bus.p)))
>                 return -ENODEV;

I think we should also return -EAGAIN here.


Thanks,

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