Index | Thread | Search

From:
Vitaliy Makkoveev <otto@bsdbox.dev>
Subject:
Re: sys/ihidev: prevent crash on interrupt storm
To:
"Kirill A. Korinsky" <kirill@korins.ky>
Cc:
Martin Pieuchot <mpi@grenadille.net>, OpenBSD tech <tech@openbsd.org>
Date:
Wed, 25 Dec 2024 02:44:19 +0300

Download raw body.

Thread

> On 25 Dec 2024, at 01:26, Vitaliy Makkoveev <otto@bsdbox.dev> wrote:
> 
> At least you should check err in the for loop, otherwise it could
> be overwritten with the EWOULDBLOCK even in the non error case. Also
> sc_st check and sleep should be serialised with sc_st modification
> within interrupt handler, otherwise the wakeup could be lost.

Sorry, missed this.

> +	for (i = 0, err = 0; i < 10 && err == 0; i++) {