lkml.org 
[lkml]   [2014]   [Aug]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] drivers/xen/evtchn.c: Check failure for evtchn_make_refcounted()
On 28/08/14 16:13, Chen Gang wrote:
> evtchn_make_refcounted() may return failure, so need process the failure
> case. In failure case, it need call unbind_from_irqhandler() just like
> evtchn_unbind_from_user() has done.
>
> irq_from_evtchn() must be OK when bind_evtchn_to_irqhandler() succeed,
> so need not check it again.
>
> Also still need remain the closing port code, because when the failure
> occurs, unbind_from_irqhandler() will not close port internally.

None of the evtchn_make_refcounted() failures can occur since we know we
have a valid irq and info at the single call site.

I would like to see this fixed by refactoring the code to remove
evtchn_make_refcounted() by making all irqs for event channels reference
counted. These no need for this refcounting to be optional.

David



\
 
 \ /
  Last update: 2014-08-28 18:21    [W:0.072 / U:0.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site