From: "Greg KH (gregkh@linuxfoundation.org)" <gregkh@linuxfoundation.org>
To: KY Srinivasan <kys@microsoft.com>
Cc: Fernando Soto <fsoto@bluecatnetworks.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Haiyang Zhang <haiyangz@microsoft.com>
Subject: Re: [PATCH] Drivers: hv: vmbus: incorrect device name is printed when child device is unregistered
Date: Fri, 14 Jun 2013 09:22:31 -0700 [thread overview]
Message-ID: <20130614162231.GA14829@kroah.com> (raw)
In-Reply-To: <21ce39ca10234c2fae6f98b029d86b5c@SN2PR03MB061.namprd03.prod.outlook.com>
On Fri, Jun 14, 2013 at 02:13:44AM +0000, KY Srinivasan wrote:
>
>
> > -----Original Message-----
> > From: Fernando Soto [mailto:fsoto@bluecatnetworks.com]
> > Sent: Thursday, June 13, 2013 8:11 PM
> > To: linux-kernel@vger.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@bluecatnetworks.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@bluecatnetworks.com>
> Acked-by: K. Y. Srinivasan <kys@microsoft.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
next prev parent reply other threads:[~2013-06-14 16:21 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-14 0:10 [PATCH] Drivers: hv: vmbus: incorrect device name is printed when child device is unregistered Fernando Soto
2013-06-14 2:13 ` KY Srinivasan
2013-06-14 16:22 ` Greg KH (gregkh@linuxfoundation.org) [this message]
2013-06-14 21:36 ` KY Srinivasan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130614162231.GA14829@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=fsoto@bluecatnetworks.com \
--cc=haiyangz@microsoft.com \
--cc=kys@microsoft.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox