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
| ||
|
Message-ID: <1276377038.21640.67.camel@Joe-Laptop.home> Date: Sat, 12 Jun 2010 14:10:38 -0700 From: Joe Perches <joe@...ches.com> To: Jussi Kivilinna <jussi.kivilinna@...et.fi> Cc: "David S.Miller" <davem@...emloft.net>, netdev@...r.kernel.org, David Brownell <dbrownell@...rs.sourceforge.net> Subject: Re: Broken rndis_host with #define DEBUG (by a475f603d23392f386e45cf377b17c30ed3bbb80) On Sat, 2010-06-12 at 23:39 +0300, Jussi Kivilinna wrote: > Commit a475f603d23392f386e45cf377b17c30ed3bbb80 "drivers/net/usb: Use > netif_<level> logging facilities" causes problems with rndis_host. > > rndis_host oopses with #define DEBUG, in generic_rndis_bind() when > calling netif_dbg(). Problem is that (netdev)->dev.parent is NULL > (used in netdev_printk) while generic_rndis_bind is called. Thanks. Here's a revert until these macros get converted to functions. Signed-off-by: Joe Perches <joe@...ches.com> --- drivers/net/usb/rndis_host.c | 14 ++++++++------ 1 files changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/net/usb/rndis_host.c b/drivers/net/usb/rndis_host.c index 28d3ee1..49c3044 100644 --- a/drivers/net/usb/rndis_host.c +++ b/drivers/net/usb/rndis_host.c @@ -342,8 +342,8 @@ generic_rndis_bind(struct usbnet *dev, struct usb_interface *intf, int flags) dev->maxpacket = usb_maxpacket(dev->udev, dev->out, 1); if (dev->maxpacket == 0) { - netif_dbg(dev, probe, dev->net, - "dev->maxpacket can't be 0\n"); + if (netif_msg_probe(dev)) + dev_dbg(&intf->dev, "dev->maxpacket can't be 0\n"); retval = -EINVAL; goto fail_and_release; } @@ -401,15 +401,17 @@ generic_rndis_bind(struct usbnet *dev, struct usb_interface *intf, int flags) } if ((flags & FLAG_RNDIS_PHYM_WIRELESS) && *phym != RNDIS_PHYSICAL_MEDIUM_WIRELESS_LAN) { - netif_dbg(dev, probe, dev->net, - "driver requires wireless physical medium, but device is not\n"); + if (netif_msg_probe(dev)) + dev_dbg(&intf->dev, "driver requires wireless " + "physical medium, but device is not.\n"); retval = -ENODEV; goto halt_fail_and_release; } if ((flags & FLAG_RNDIS_PHYM_NOT_WIRELESS) && *phym == RNDIS_PHYSICAL_MEDIUM_WIRELESS_LAN) { - netif_dbg(dev, probe, dev->net, - "driver requires non-wireless physical medium, but device is wireless.\n"); + if (netif_msg_probe(dev)) + dev_dbg(&intf->dev, "driver requires non-wireless " + "physical medium, but device is wireless.\n"); retval = -ENODEV; goto halt_fail_and_release; } -- 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