ia64/xen-unstable

changeset 8232:99b9046a8df2

Add a comment to tricky corner case in evtchn_close().

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Sun Dec 04 11:54:04 2005 +0100 (2005-12-04)
parents 8098cc1daac4
children 5c44f0905ca0
files xen/common/event_channel.c
line diff
     1.1 --- a/xen/common/event_channel.c	Sat Dec 03 17:52:38 2005 -0700
     1.2 +++ b/xen/common/event_channel.c	Sun Dec 04 11:54:04 2005 +0100
     1.3 @@ -344,6 +344,14 @@ static long __evtchn_close(struct domain
     1.4          }
     1.5          else if ( d2 != chn1->u.interdomain.remote_dom )
     1.6          {
     1.7 +            /*
     1.8 +             * We can only get here if the port was closed and re-bound after
     1.9 +             * unlocking d1 but before locking d2 above. We could retry but
    1.10 +             * it is easier to return the same error as if we had seen the
    1.11 +             * port in ECS_CLOSED. It must have passed through that state for
    1.12 +             * us to end up here, so it's a valid error to return.
    1.13 +             */
    1.14 +            BUG_ON(d1 != current->domain);
    1.15              rc = -EINVAL;
    1.16              goto out;
    1.17          }