Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Aug 2024 15:21:42 GMT
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: e228961d6e3b - main - rangelock_destoy(): poison lock->head to trip fault on lock attempt
Message-ID:  <202408211521.47LFLgW9067196@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=e228961d6e3b4a22a3684dc4f688cc3cd3cdff09

commit e228961d6e3b4a22a3684dc4f688cc3cd3cdff09
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2024-08-10 08:12:42 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2024-08-21 15:18:56 +0000

    rangelock_destoy(): poison lock->head to trip fault on lock attempt
    
    Tested by:      markj, pho
    Sponsored by:   The FreeBSD Foundation
---
 sys/kern/kern_rangelock.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sys/kern/kern_rangelock.c b/sys/kern/kern_rangelock.c
index c01ed05e4a6a..992a19701611 100644
--- a/sys/kern/kern_rangelock.c
+++ b/sys/kern/kern_rangelock.c
@@ -344,6 +344,7 @@ rangelock_destroy(struct rangelock *lock)
 	MPASS(!lock->sleepers);
 	if (!rangelock_cheat_destroy(lock))
 		rangelock_noncheating_destroy(lock);
+	DEBUG_POISON_POINTER(*(void **)&lock->head);
 }
 
 static bool



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202408211521.47LFLgW9067196>