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:	Fri, 14 Jun 2013 09:22:31 -0700
From:	"Greg KH (gregkh@...uxfoundation.org)" <gregkh@...uxfoundation.org>
To:	KY Srinivasan <kys@...rosoft.com>
Cc:	Fernando Soto <fsoto@...ecatnetworks.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Haiyang Zhang <haiyangz@...rosoft.com>
Subject: Re: [PATCH] Drivers: hv: vmbus: incorrect device name is printed
 when child device is unregistered

On Fri, Jun 14, 2013 at 02:13:44AM +0000, KY Srinivasan wrote:
> 
> 
> > -----Original Message-----
> > From: Fernando Soto [mailto:fsoto@...ecatnetworks.com]
> > Sent: Thursday, June 13, 2013 8:11 PM
> > To: linux-kernel@...r.kernel.org
> > Cc: KY Srinivasan; Haiyang Zhang
> > Subject: [PATCH] Drivers: hv: vmbus: incorrect device name is printed when child
> > device is unregistered
> > 
> > From: Fernando Soto <fsoto@...ecatnetworks.com>
> > Please CC me, I am not subscribed to the list.
> > 
> > Whenever a device is unregistered in vmbus_device_unregister
> > (drivers/hv/vmbus_drv.c), the device name in the log message may contain
> > garbage as the memory has already been freed by the time pr_info is called. Log
> > example:
> >  [ 3149.170475] hv_vmbus: child device àõsèè0_5 unregistered
> > 
> > By logging the message just before calling device_unregister, the correct device
> > name is printed:
> > [ 3145.034652] hv_vmbus: child device vmbus_0_5 unregistered
> > 
> > Signed-off-by: Fernando M Soto <fsoto@...ecatnetworks.com>
> Acked-by: K. Y. Srinivasan <kys@...rosoft.com>
> 
> > --- linux-3.10-rc5/drivers/hv/vmbus_drv.c.orig	2013-06-13 19:20:55.359511352 -
> > 0400
> > +++ linux-3.10-rc5/drivers/hv/vmbus_drv.c	2013-06-13 19:21:39.299511695 -
> > 0400
> > @@ -698,14 +698,14 @@ int vmbus_device_register(struct hv_devi
> >   */
> >  void vmbus_device_unregister(struct hv_device *device_obj)
> >  {
> > +	pr_info("child device %s unregistered\n",
> > +		dev_name(&device_obj->device));
> > +
> >  	/*
> >  	 * Kick off the process of unregistering the device.
> >  	 * This will call vmbus_remove() and eventually vmbus_device_release()
> >  	 */
> >  	device_unregister(&device_obj->device);
> > -
> > -	pr_info("child device %s unregistered\n",
> > -		dev_name(&device_obj->device));

No, please just remove these entirely, or make them pr_debug(), you
shouldn't clutter up the kernel log for stuff like this.

thanks,

greg k-h
--
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