OPNsense - FreeBSD source
Find a file
Fabian Keil f7856fe81d g_dev_orphan(): Return early if the device is already gone
The following panic was the result of running "cdcontrol eject" after
using the physical ejection key on the device before the tray was
actually ejected. So we have hardware racing software.

The device was loaded with a DVD.

Resulted in a NULL pointer dereference

g_dev_orphan() at g_dev_orphan+0x2e/frame 0xfffffe01eba0a9f0
g_resize_provider_event() at g_resize_provider_event+0x71/frame 0xfffffe01eba0aa20
g_run_events() at g_run_events+0x20e/frame 0xfffffe01eba0aa70
fork_exit() at fork_exit+0x85/frame 0xfffffe01eba0aab0
fork_trampoline() at fork_trampoline+0xe/frame 0xfffffe01eba0aab0

Avoid this possibility and return early of dev is NULL already.

PR:  215856
Reviewed by: imp (I've triggered this once or twice over the years too)
Sponsored by: Netflix
2025-03-13 17:20:00 -06:00
.cirrus-ci Cirrus-CI: add some timing info on pkg install failure 2021-08-04 15:02:00 -04:00
.github Vendor import of OpenSSH 9.9p2 2025-02-18 21:47:51 -05:00
bin sh(1): Replace recommendation of use of -e with a note 2025-03-08 17:13:25 +01:00
cddl libdtrace: Fix an off-by-one in CPU ID handling 2025-03-09 23:00:59 -04:00
contrib ntp: NULL pointer deref when create_interface() fails 2025-02-28 07:53:22 -08:00
crypto openssh: Fix blacklistd sshd-session integration 2025-02-24 14:38:52 +00:00
etc mtree: Add missing flua/freebsd/sys entry 2025-02-05 19:53:23 +00:00
gnu Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
include rpc: limited multithread support for svc_nl 2025-02-01 01:00:28 -08:00
kerberos5 Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
lib libprocstat: add helper to query knotes for specific kqueue 2025-03-13 18:09:35 +02:00
libexec rc.d/sendmail: remove a obsolete upgrade seatbelt 2025-03-13 19:41:35 +00:00
release release/vm: force replacement of compressed images 2025-03-12 21:05:43 +00:00
rescue nvmf: Switch several ioctls to using nvlists 2024-12-30 13:52:21 -05:00
sbin ipf: Correct ippool.5 man page 2025-03-04 12:39:07 -08:00
secure caroot: update the root bundle 2025-03-13 08:46:01 +01:00
share build(7): Document KERNBUILDDIR 2025-03-08 09:59:03 -07:00
stand loader.kboot: smbios: Add a comment about v3 entry point being favored 2025-03-11 14:54:11 +01:00
sys g_dev_orphan(): Return early if the device is already gone 2025-03-13 17:20:00 -06:00
targets gvinum(8): Remove userland tool for managing vinum volumes 2025-01-23 11:20:43 -05:00
tests sound: Refactor the format conversion framework 2025-03-10 21:19:15 +01:00
tools depend-cleanup: Add examples for common cases 2025-03-12 10:32:58 -04:00
usr.bin procstat.1: correct description of the kstack subcommand after removal of swapping 2025-03-13 18:09:35 +02:00
usr.sbin wlanstats: add GCMP crypto counters 2025-03-12 17:02:36 -07:00
.arcconfig arcanist: use FreeBSD/git project repository instead of FreeBSD/svn 2022-08-23 14:16:41 +00:00
.arclint arc lint: ignore /tests/ in chmod 2017-12-19 03:38:06 +00:00
.cirrus.yml .cirrus-ci: Update the non-manual GCC build job to GCC 14 2025-03-03 11:51:47 -05:00
.clang-format clang-format: Minor tweaks 2024-04-30 17:33:43 -04:00
.git-blame-ignore-revs git-blame-ignore-revs: list rtld-elf reformatting 2025-01-21 03:57:21 +02:00
.gitattributes Remove SVN related Git attributes 2023-12-26 10:28:28 -07:00
.gitignore Import libecc v0.9.7 2024-12-16 22:18:42 -06:00
.mailmap mailmap: Translate my personal address 2024-06-22 08:57:56 +02:00
CONTRIBUTING.md CONTRIBUTING.md/style: spring cleaning 2024-05-10 15:07:03 -06:00
COPYRIGHT copyright: Happy New Year 2025 2025-01-01 00:04:28 +00:00
LOCKS Update LOCKS for Git 2023-12-26 10:28:25 -07:00
MAINTAINERS man filesystems: fix more xrefs after move to s4 2024-06-27 18:32:05 -06:00
Makefile universe: Update the default GCC toolchain to GCC 14 2025-03-03 11:51:53 -05:00
Makefile.inc1 Makefile.inc1: packageworld: remove non-NO_ROOT cases 2025-03-10 14:15:44 -04:00
Makefile.libcompat Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
Makefile.sys.inc Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
ObsoleteFiles.inc ObsoleteFiles: Remove if_rtwn.4 removal 2025-03-13 19:18:11 -04:00
README.md Import libecc v0.9.7 2024-12-16 22:18:42 -06:00
RELNOTES RELNOTES: Add 02d4eeabfd note 2025-02-25 13:58:25 +02:00
UPDATING ipfw: add UPDATING note and modify __FreeBSD_version 2025-03-03 21:58:24 +03:00

FreeBSD Source:

This is the top level of the FreeBSD source directory.

FreeBSD is an operating system used to power modern servers, desktops, and embedded platforms. A large community has continually developed it for more than thirty years. Its advanced networking, security, and storage features have made FreeBSD the platform of choice for many of the busiest web sites and most pervasive embedded networking and storage devices.

For copyright information, please see the file COPYRIGHT in this directory. Additional copyright information also exists for some sources in this tree - please see the specific source directories for more information.

The Makefile in this directory supports a number of targets for building components (or all) of the FreeBSD source tree. See build(7), config(8), FreeBSD handbook on building userland, and Handbook for kernels for more information, including setting make(1) variables.

For information on the CPU architectures and platforms supported by FreeBSD, see the FreeBSD website's Platforms page.

For official FreeBSD bootable images, see the release page.

Source Roadmap:

Directory Description
bin System/user commands.
cddl Various commands and libraries under the Common Development and Distribution License.
contrib Packages contributed by 3rd parties.
crypto Cryptography stuff (see crypto/README).
etc Template files for /etc.
gnu Commands and libraries under the GNU General Public License (GPL) or Lesser General Public License (LGPL). Please see gnu/COPYING and gnu/COPYING.LIB for more information.
include System include files.
kerberos5 Kerberos5 (Heimdal) package.
lib System libraries.
libexec System daemons.
release Release building Makefile & associated tools.
rescue Build system for statically linked /rescue utilities.
sbin System commands.
secure Cryptographic libraries and commands.
share Shared resources.
stand Boot loader sources.
sys Kernel sources (see sys/README.md).
targets Support for experimental DIRDEPS_BUILD
tests Regression tests which can be run by Kyua. See tests/README for additional information.
tools Utilities for regression testing and miscellaneous tasks.
usr.bin User commands.
usr.sbin System administration commands.

For information on synchronizing your source tree with one or more of the FreeBSD Project's development branches, please see FreeBSD Handbook.