Skip to content

Commit 3af441d

Browse files
committed
linuxkm/linuxkm_wc_port.h: fix raw_spinlock.magic poison strategy in wc_FreeMutex().
1 parent f12cb8c commit 3af441d

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

linuxkm/linuxkm_wc_port.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2004,7 +2004,10 @@
20042004
static __always_inline int wc_FreeMutex(wolfSSL_Mutex* m)
20052005
{
20062006
#ifdef CONFIG_DEBUG_SPINLOCK
2007-
m->lock.magic = 0;
2007+
/* clear raw_spinlock.magic, but without drilling through the
2008+
* abstraction barrier.
2009+
*/
2010+
memset(&m->lock, 0, sizeof m->lock);
20082011
#endif
20092012
#ifdef WOLFSSL_LINUXKM_VERBOSE_DEBUG
20102013
m->magic = 0;

0 commit comments

Comments
 (0)