From: Noboru Iwamatsu <n_iwamatsu@jp.fujitsu.com>
To: xen-devel@lists.xensource.com
Subject: Re: [PATCH] linux/usbback: fix usbstub_exit() placement
Date: Fri, 16 Oct 2009 10:00:51 +0900 [thread overview]
Message-ID: <4AD7C5C3.7080001@jp.fujitsu.com> (raw)
In-Reply-To: <4AD730BE020000780001A13C@vpn.id2.novell.com>
Hi,
Jan Beulich wrote:
> The function is being referenced from (non-__exit) usbback_init().
No, usbstub_exit() is only referenced from usbback_exit() in the
latest version.
Are you suggesting that usbstub_exit() should be referenced from
usbback_init() and should do as follows?
Signed-off-by: Noboru Iwamatsu <n_iwamatsu@jp.fujitsu.com>
diff -r ba13757d92ce drivers/xen/usbback/usbback.c
--- a/drivers/xen/usbback/usbback.c Thu Oct 08 15:37:22 2009 +0900
+++ b/drivers/xen/usbback/usbback.c Fri Oct 16 09:35:28 2009 +0900
@@ -1123,12 +1123,13 @@
return 0;
- out_of_memory:
- kfree(pending_reqs);
- kfree(pending_grant_handles);
- free_empty_pages_and_pagevec(pending_pages, mmap_pages);
- printk("%s: out of memory\n", __FUNCTION__);
- return -ENOMEM;
+out_of_memory:
+ usbstub_exit();
+ kfree(pending_reqs);
+ kfree(pending_grant_handles);
+ free_empty_pages_and_pagevec(pending_pages, mmap_pages);
+ printk("%s: out of memory\n", __FUNCTION__);
+ return -ENOMEM;
}
static void __exit usbback_exit(void)
diff -r ba13757d92ce drivers/xen/usbback/usbstub.c
--- a/drivers/xen/usbback/usbstub.c Thu Oct 08 15:37:22 2009 +0900
+++ b/drivers/xen/usbback/usbstub.c Fri Oct 16 09:35:28 2009 +0900
@@ -317,7 +317,7 @@
return err;
}
-void __exit usbstub_exit(void)
+void usbstub_exit(void)
{
driver_remove_file(&usbback_usb_driver.driver,
&driver_attr_port_ids);
next prev parent reply other threads:[~2009-10-16 1:00 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-15 12:25 [PATCH] linux/usbback: fix usbstub_exit() placement Jan Beulich
2009-10-16 1:00 ` Noboru Iwamatsu [this message]
2009-10-16 8:38 ` Jan Beulich
2009-10-16 14:42 ` Noboru Iwamatsu
2009-10-19 9:52 ` Keir Fraser
2009-10-22 10:30 ` Jan Beulich
2009-10-26 0:32 ` Noboru Iwamatsu
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=4AD7C5C3.7080001@jp.fujitsu.com \
--to=n_iwamatsu@jp.fujitsu.com \
--cc=xen-devel@lists.xensource.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.