Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 356938
b: refs/heads/master
c: e7e44e4
h: refs/heads/master
v: v3
  • Loading branch information
Wei Liu authored and Konrad Rzeszutek Wilk committed Feb 20, 2013
1 parent 6db91f6 commit b978dd3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 18283ea7433c703d3fcce33d189b637a7aaf0a49
refs/heads/master: e7e44e444876478d50630f57b0c31d29f6725020
10 changes: 10 additions & 0 deletions trunk/drivers/xen/evtchn.c
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,14 @@ static int evtchn_bind_to_user(struct per_user_data *u, int port)
u->name, (void *)(unsigned long)port);
if (rc >= 0)
rc = evtchn_make_refcounted(port);
else {
/* bind failed, should close the port now */
struct evtchn_close close;
close.port = port;
if (HYPERVISOR_event_channel_op(EVTCHNOP_close, &close) != 0)
BUG();
set_port_user(port, NULL);
}

return rc;
}
Expand All @@ -277,6 +285,8 @@ static void evtchn_unbind_from_user(struct per_user_data *u, int port)
{
int irq = irq_from_evtchn(port);

BUG_ON(irq < 0);

unbind_from_irqhandler(irq, (void *)(unsigned long)port);

set_port_user(port, NULL);
Expand Down

0 comments on commit b978dd3

Please sign in to comment.