On Wed, Jan 30, 2019 at 08:28:15PM -0800, Christopher Clark wrote:
> Queries for data about space availability in registered rings and
> causes notification to be sent when space has become available.
> 
> The hypercall op populates a supplied data structure with information about
> ring state and if insufficient space is currently available in a given ring,
> the hypervisor will record the domain's expressed interest and notify it
> when it observes that space has become available.
> 
> Checks for free space occur when this notify op is invoked, so it may be
> intentionally invoked with no data structure to populate
> (ie. a NULL argument) to trigger such a check and consequent notifications.
> 
> Limit the maximum number of notify requests in a single operation to a
> simple fixed limit of 256.
> 
> Signed-off-by: Christopher Clark <christopher.cla...@baesystems.com>
> Tested-by: Chris Patterson <patters...@ainfosec.com>

Reviewed-by: Roger Pau Monné <roger....@citrix.com>

Despite the usage of list_for_each_entry_safe instead of
list_first_entry_or_null.

> +static void
> +pending_notify(struct list_head *to_notify)
> +{
> +    struct pending_ent *ent, *next;
> +
> +    ASSERT(LOCKING_Read_L1);
> +
> +    /* Sending signals for all ents in this list, draining until it is 
> empty. */
> +    list_for_each_entry_safe(ent, next, to_notify, node)

list_first_entry_or_null would be more suitable here.

Roger.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

Reply via email to