Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 31 Dec 2016 11:24:11 +0200
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        Luiz Otavio O Souza <loos@FreeBSD.org>
Cc:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   Re: svn commit: r310883 - stable/11/sys/dev/etherswitch
Message-ID:  <20161231092411.GR1923@kib.kiev.ua>
In-Reply-To: <201612310158.uBV1w5TD016885@repo.freebsd.org>
References:  <201612310158.uBV1w5TD016885@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Dec 31, 2016 at 01:58:05AM +0000, Luiz Otavio O Souza wrote:
> -static int
>  etherswitchioctl(struct cdev *cdev, u_long cmd, caddr_t data, int flags, struct thread *td)
>  {
>  	struct etherswitch_softc *sc = cdev->si_drv1;
Since si_drv1 is dereferenced in the cdevsw methods, please consider
converting the driver to use make_dev_s(9) KPI.  This would fix a race
with a thread accessing not yet initialized si_drv1 in parallel with
the makedev thread.



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