Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 Mar 2019 19:39:07 -0700
From:      Enji Cooper <yaneurabeya@gmail.com>
To:        Alan Somers <asomers@FreeBSD.org>
Cc:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   Re: svn commit: r345563 - projects/fuse2/tests/sys/fs/fusefs
Message-ID:  <43ACF554-1D64-4CDE-AB22-8A13E3585CC9@gmail.com>
In-Reply-To: <201903270024.x2R0Ov1e073868@repo.freebsd.org>
References:  <201903270024.x2R0Ov1e073868@repo.freebsd.org>

index | next in thread | previous in thread | raw e-mail


> On Mar 26, 2019, at 5:24 PM, Alan Somers <asomers@FreeBSD.org> wrote:
> 
> Author: asomers
> Date: Wed Mar 27 00:24:57 2019
> New Revision: 345563
> URL: https://svnweb.freebsd.org/changeset/base/345563
> 
> Log:
>  fusefs: fix a race condition in the allow_other test
> 
>  The test could occasionally hang if the parent's SIGUSR2 signal arrived
>  before the child had pause()d.  Using POSIX semaphores precludes that
>  possibility.
> 
>  Sponsored by:	The FreeBSD Foundation

…

> +	sem = (sem_t*)mmap(NULL, sizeof(*sem), mprot, mflags, -1, 0);
> +	ASSERT_NE(NULL, sem) << strerror(errno);

mmap will return “MAP_FAILED”, not NULL, on error.

Thanks,
-Enji

help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?43ACF554-1D64-4CDE-AB22-8A13E3585CC9>