Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 22 Aug 2019 17:57:32 -0600
From:      Warner Losh <imp@bsdimp.com>
To:        John Baldwin <jhb@freebsd.org>
Cc:        Warner Losh <imp@freebsd.org>, src-committers <src-committers@freebsd.org>, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r351406 - head/sys/dev/nvme
Message-ID:  <CANCZdfr4ETsuSmD91EomrPnbi%2B5hX89jq5Uq1%2BbNg9PPCahAaQ@mail.gmail.com>
In-Reply-To: <bcd7d7cc-a79f-98a1-49b1-8868bfc64818@FreeBSD.org>
References:  <201908222112.x7MLCpbt023647@repo.freebsd.org> <bcd7d7cc-a79f-98a1-49b1-8868bfc64818@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Aug 22, 2019, 3:27 PM John Baldwin <jhb@freebsd.org> wrote:

> On 8/22/19 2:12 PM, Warner Losh wrote:
> > Author: imp
> > Date: Thu Aug 22 21:12:51 2019
> > New Revision: 351406
> > URL: https://svnweb.freebsd.org/changeset/base/351406
> >
> > Log:
> >   We need to define version 1 of nvme, not nvme_foo. Otherwise nvd won't
> >   load and people who pull in nvme/nvd from modules can't load nvd.ko
> >   since it depends on nvme, not nvme_foo. The duplicate doesn't matter
> >   since kldxref properly handles that case.
>
> I would perhaps have put the MODULE_VERSION for nvme and its dependency
> on cam into nvme.c instead of duplicating it.  I think that is more
> consistent
> with what we have done elsewhere in the tree.
>

That can't be true. Doing that doesn't work. We wind up dereferencing freed
memory, as we discussed on IRC. Each DRIVER_MODULE needs its own
MODULE_VERSION given the current code. I'd call that a bug, but not one I
could dig into today...

Warner

>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfr4ETsuSmD91EomrPnbi%2B5hX89jq5Uq1%2BbNg9PPCahAaQ>