Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Oct 2014 07:50:14 -0400
From:      Eric van Gyzen <eric@vangyzen.net>
To:        Konstantin Belousov <kostikbel@gmail.com>
Cc:        arch@freebsd.org
Subject:   Re: RfC: fueword(9) and casueword(9)
Message-ID:  <54464876.80905@vangyzen.net>
In-Reply-To: <20141021094539.GA1877@kib.kiev.ua>
References:  <20141021094539.GA1877@kib.kiev.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
On 10/21/2014 05:45, Konstantin Belousov wrote:
> @@ -921,7 +933,9 @@ do_lock_normal(struct thread *td, struct umutex *m, uint32_t flags,
>  	 * can fault on any access.
>  	 */
>  	for (;;) {
> -		owner = fuword32(__DEVOLATILE(void *, &m->m_owner));
> +		rv = fueword32(__DEVOLATILE(void *, &m->m_owner), &owner);
> +		if (error == -1)
> +			return (EFAULT);

rv is assigned, but error is tested.

I only reviewed kern_umtx.c, and very quickly.  I'll try to review more
thoroughly later today.

Eric



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