Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F96887752
D33624.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
991 B
Referenced Files
None
Subscribers
None
D33624.diff
View Options
Index: sys/dev/xen/bus/xen_intr.c
===================================================================
--- sys/dev/xen/bus/xen_intr.c
+++ sys/dev/xen/bus/xen_intr.c
@@ -433,7 +433,8 @@
*isrcp = NULL;
if (port_handlep == NULL) {
printf("%s: %s: Bad event handle\n", intr_owner, __func__);
- return (EINVAL);
+ error = EINVAL;
+ goto failearly;
}
*port_handlep = NULL;
@@ -443,8 +444,10 @@
params->xi_type));
isrc = xen_intr_alloc_isrc(params);
- if (isrc == NULL)
- return (ENOSPC);
+ if (isrc == NULL) {
+ error = ENOSPC;
+ goto failearly;
+ }
refcount_init(&isrc->xi_refcount, 1);
#ifdef SMP
cpu = isrc->xi_cpu;
@@ -502,6 +505,15 @@
/* Assign the opaque handler */
*port_handlep = xen_intr_handle_from_isrc(isrc);
return (0);
+
+failearly:
+ if (params->xi_close) {
+ evtchn_close_t close = { .port = params->xi_port };
+ if (HYPERVISOR_event_channel_op(EVTCHNOP_close, &close))
+ panic("EVTCHNOP_close failed");
+ }
+
+ return (error);
}
/**
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Sep 28, 2:15 AM (21 h, 52 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
12964700
Default Alt Text
D33624.diff (991 B)
Attached To
Mode
D33624: xen/intr: add channel closing in case of early setup failure
Attached
Detach File
Event Timeline
Log In to Comment