From: Ali Farzanrad Subject: Forever loop in azalia.c To: tech@openbsd.org Cc: kettenis@openbsd.org, ratchov@openbsd.org, martijn@openbsd.org, stsp@openbsd.org Date: Fri, 24 May 2024 10:08:29 +0000 Hi tech@ I found this infinite loop in azalia.c: Index: azalia.c =================================================================== RCS file: /home/cvs/src/sys/dev/pci/azalia.c,v diff -u -p -r1.287 azalia.c --- azalia.c 17 May 2024 19:43:45 -0000 1.287 +++ azalia.c 24 May 2024 10:03:02 -0000 @@ -701,7 +701,7 @@ azalia_intr(void *v) int ret = 0; mtx_enter(&audio_lock); - for (;;) { + do { intsts = AZ_READ_4(az, INTSTS); if ((intsts & az->intctl) == 0 || intsts == 0xffffffff) break; @@ -722,7 +722,7 @@ azalia_intr(void *v) azalia_rirb_intr(az); ret = 1; } - } + } while (0); mtx_leave(&audio_lock); return (ret); } I CCed this email to everyone related to that forever loop commit. Bests, Ali Farzanrad