lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 15 Feb 2016 21:50:30 +0100
From:	Radim Krcmar <rkrcmar@...hat.com>
To:	Vitaly Kuznetsov <vkuznets@...hat.com>
Cc:	devel@...uxdriverproject.org, linux-kernel@...r.kernel.org,
	"K. Y. Srinivasan" <kys@...rosoft.com>,
	Haiyang Zhang <haiyangz@...rosoft.com>,
	Cathy Avery <cavery@...hat.com>
Subject: Re: [PATCH 1/4] Drivers: hv: vmbus: don't loose HVMSG_TIMER_EXPIRED
 messages

2016-02-12 16:42+0100, Vitaly Kuznetsov:
> We must handle HVMSG_TIMER_EXPIRED messages in the interrupt context
> and we offload all the rest to vmbus_on_msg_dpc() tasklet. This functions
> loops to see if there are new messages pending. In case we'll ever see
> HVMSG_TIMER_EXPIRED message there we're going to lose it as we can't
> handle it from there. Avoid looping in vmbus_on_msg_dpc(), we're OK
> with handling one message per interrupt.

We could loop as long as the message type is handleable in the tasklet,
which might increase performance, but the code nicer this way;

Reviewed-by: Radim Krčmář <rkrcmar@...hat.com>

> Signed-off-by: Vitaly Kuznetsov <vkuznets@...hat.com>
> ---
> diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c
> @@ -716,51 +716,49 @@ static void vmbus_on_msg_dpc(unsigned long data)
>  	struct vmbus_channel_message_table_entry *entry;
>  	struct onmessage_work_context *ctx;
>  
> -	while (1) {
> -		if (msg->header.message_type == HVMSG_NONE)
> -			/* no msg */
> -			break;
> +	if (msg->header.message_type == HVMSG_NONE)

(This condition should never be true now.)

> +		/* no msg */
> +		return;

Btw. what is/are the other HVMSG_* that we get?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ