Bug 220867 - Double loading of the if_tap module causes the system to crash, without panic and reboot
Summary: Double loading of the if_tap module causes the system to crash, without panic...
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 11.0-STABLE
Hardware: Any Any
: --- Affects Only Me
Assignee: Kyle Evans
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-07-19 21:27 UTC by Vladyslav V. Prodan
Modified: 2019-04-28 03:51 UTC (History)
3 users (show)

See Also:


Attachments
Screenshot of the screen at the moment of crash (15.44 KB, image/png)
2017-07-19 21:27 UTC, Vladyslav V. Prodan
no flags Details
kldstat -v (14.50 KB, text/plain)
2017-07-19 21:28 UTC, Vladyslav V. Prodan
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vladyslav V. Prodan 2017-07-19 21:27:55 UTC
Created attachment 184517 [details]
Screenshot of the screen at the moment of crash

Double loading of the if_tap module causes the system to crash, without panic and reboot

I have FreeBSD system:
# uname -a
FreeBSD core.domain.com 11.1-PRERELEASE FreeBSD 11.1-PRERELEASE #0 r318606: Mon May 22 14:28:27 EEST 2017     root@core.domain.com:/usr/obj/usr/src/sys/core.domain.com.1  amd64

The if_tap module is compiled into the kernel

If you add to /boot/loader.conf:
If_tap_load = "YES"

And reboot system, then I get a crash system, without panic and reboot

# kldstat -v | grep if_tap
                330 if_tap

# kldstat
Id Refs Address            Size     Name
 1   15 0xffffffff80200000 13b1b00  kernel
 2    1 0xffffffff815b3000 303178   zfs.ko
 3    2 0xffffffff818b7000 aab0     opensolaris.ko
 4    1 0xffffffff818c2000 29f0     nmdm.ko
 5    1 0xffffffff818c5000 3552e0   vmm.ko
Comment 1 Vladyslav V. Prodan 2017-07-19 21:28:44 UTC
Created attachment 184518 [details]
kldstat -v
Comment 2 commit-hook freebsd_committer freebsd_triage 2019-04-25 18:23:03 UTC
A commit references this bug:

Author: kevans
Date: Thu Apr 25 18:22:23 UTC 2019
New revision: 346688
URL: https://svnweb.freebsd.org/changeset/base/346688

Log:
  tap(4): Add a MODULE_VERSION

  Otherwise tap(4) can be loaded by loader despite being compiled into the
  kernel, causing a panic as things try to double-initialize.

  PR:		220867
  MFC after:	3 days

Changes:
  head/sys/net/if_tap.c
Comment 3 commit-hook freebsd_committer freebsd_triage 2019-04-28 03:51:17 UTC
A commit references this bug:

Author: kevans
Date: Sun Apr 28 03:51:09 UTC 2019
New revision: 346803
URL: https://svnweb.freebsd.org/changeset/base/346803

Log:
  MFC r346688-r346689: tap(4) MODULE_VERSION

  r346688:
  tap(4): Add a MODULE_VERSION

  Otherwise tap(4) can be loaded by loader despite being compiled into the
  kernel, causing a panic as things try to double-initialize.

  r346689:
  tap(4): Correct driver name...

  PR:		220867

Changes:
_U  stable/11/
  stable/11/sys/net/if_tap.c
_U  stable/12/
  stable/12/sys/net/if_tap.c