[Bug 293382] Dead lock and kernel crash around closefp_impl
- In reply to: bugzilla-noreply_a_freebsd.org: "[Bug 293382] Dead lock and kernel crash around closefp_impl"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 09 Apr 2026 20:19:10 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=293382
--- Comment #50 from Konstantin Belousov <kib@FreeBSD.org> ---
Please drop any previous patches you have.
Then update to the latest main sources, which have several asserts added by
Kyle and me.
Then apply only the following change and see if the issue is reproducible.
diff --git a/sys/kern/kern_event.c b/sys/kern/kern_event.c
index bb5203b8cb0b..ff3ae96a452f 100644
--- a/sys/kern/kern_event.c
+++ b/sys/kern/kern_event.c
@@ -2043,8 +2043,13 @@ kqueue_expand(struct kqueue *kq, const struct filterops
*fops, uintptr_t ident,
to_free = list;
} else {
if (kq->kq_knlist != NULL) {
- bcopy(kq->kq_knlist, list,
- kq->kq_knlistsize * sizeof(*list));
+ volatile char *src, *dst;
+ src = (void *)kq->kq_knlist;
+ dst = (void *)list;
+ for (size_t i = 0;
+ i < kq->kq_knlistsize *
sizeof(*list);
+ i++)
+ dst[i] = src[i];
to_free = kq->kq_knlist;
kq->kq_knlist = NULL;
}
--
You are receiving this mail because:
You are the assignee for the bug.