Date: Thu, 13 Nov 2014 20:56:26 +0200 From: Konstantin Belousov <kostikbel@gmail.com> To: Eric van Gyzen <eric@vangyzen.net> Cc: FreeBSD current <freebsd-current@freebsd.org> Subject: Re: [patch] Wrong assertion in kern_umtx.c Message-ID: <20141113185626.GB17068@kib.kiev.ua> In-Reply-To: <5464ECDC.1080002@vangyzen.net> References: <5464ECDC.1080002@vangyzen.net>
index | next in thread | previous in thread | raw e-mail
On Thu, Nov 13, 2014 at 12:39:40PM -0500, Eric van Gyzen wrote:
> There is a [practically] tautological assertion in kern_umtx.c. I have
> not even compile-tested the following patch. I'll test it when I have
> time. I'd be grateful if someone beats me to it.
>
> Eric
>
>
> diff --git a/sys/kern/kern_umtx.c b/sys/kern/kern_umtx.c
> index 33fdf71..c6b42c0 100644
> --- a/sys/kern/kern_umtx.c
> +++ b/sys/kern/kern_umtx.c
> @@ -169,7 +169,7 @@ struct umtxq_chain {
> };
>
> #define UMTXQ_LOCKED_ASSERT(uc)
> mtx_assert(&(uc)->uc_lock, MA_OWNED)
> -#define UMTXQ_BUSY_ASSERT(uc) KASSERT(&(uc)->uc_busy, ("umtx
> chain is not busy"))
> +#define UMTXQ_BUSY_ASSERT(uc) KASSERT((uc)->uc_busy, ("umtx
> chain is not busy"))
>
> /*
> * Don't propagate time-sharing priority, there is a security reason,
>
Yes, I tested it, thanks for the submission.
I committed r274478, and I decided to remove macro used in single place,
at all. There is one more place, which I added several weeks ago, but
I really do not see much point in using the macro, it obfuscates the code.
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20141113185626.GB17068>
