Subject: Re: [PATCH net-next v3] Add support of Cavium Liquidio ethernet adapters

From: Lino Sanfilippo <[email-masked]>
Date: Sat, 20 Dec 2014 01:33:50 +0100

On 19.12.2014 04:25, Raghu Vatsavayi wrote:
> +sleep_cond(wait_queue_head_t *wait_queue, int *condition)
> +{
> +	wait_queue_t we;
> +
> +	init_waitqueue_entry(&we, current);
> +	add_wait_queue(wait_queue, &we);
> +	set_current_state(TASK_INTERRUPTIBLE);
> +	while (!(ACCESS_ONCE(*condition)))
> +		schedule();
> +	set_current_state(TASK_RUNNING);
> +	remove_wait_queue(wait_queue, &we);
> +}

This looks as if we should at least check for pending signals, otherwise
there is no point in waiting interruptible.
Maybe wait_event_interruptible() is what we really want here...

Regards,
Lino