[Bug 213903] Kernel crashes from turnstile_broadcast (/usr/src/sys/kern/subr_turnstile.c:837)

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Mon Jul 3 18:07:47 UTC 2017


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=213903

--- Comment #40 from Cassiano Peixoto <peixoto.cassiano at gmail.com> ---
(In reply to Mateusz Guzik from comment #39)
Mateusz,

I can test it, but my 10-STABLE version has a different code:

/* Release a write lock. */
#define __rw_wunlock(rw, tid, file, line) do {                          \
        uintptr_t _tid = (uintptr_t)(tid);                              \
        uintptr_t _v;                                                   \
                                                                        \
        if ((rw)->rw_recurse)                                           \
                (rw)->rw_recurse--;                                     \
        else {                                                          \
                _v = (rw)->rw_lock;                                     \
                if (_v != _tid || !_rw_write_unlock_fetch((rw), &_v))   \
                        _rw_wunlock_hard((rw), _v, _tid, (file), (line));\
        }                                                               \
} while (0)

How shoukd i adapt your patch in this code?

Thanks.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the freebsd-stable mailing list