svn commit: r351406 - head/sys/dev/nvme

Jung-uk Kim jkim at FreeBSD.org
Fri Aug 23 00:53:50 UTC 2019


On 19. 8. 22., Warner Losh wrote:
> On Thu, Aug 22, 2019, 3:27 PM John Baldwin <jhb at freebsd.org
> <mailto:jhb at 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... 

FYI, the attached patch works for me.

Jung-uk Kim
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nvme.diff
Type: text/x-patch
Size: 1570 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/svn-src-all/attachments/20190822/3de15f72/attachment.bin>


More information about the svn-src-all mailing list