Do not load dtraceall.ko if dtrace.ko is already loaded.
This was the intent of the existing code, but instead it would unconditionally load dtraceall.ko because of a stale errno value. Reported by: pho MFC after: 1 week Sponsored by: The FreeBSD Foundation
This commit is contained in:
parent
46994ec2b1
commit
d8f743dcaa
@ -1105,7 +1105,7 @@ dt_vopen(int version, int flags, int *errp,
|
||||
dt_provmod_open(&provmod, &df);
|
||||
|
||||
dtfd = open("/dev/dtrace/dtrace", O_RDWR | O_CLOEXEC);
|
||||
err = errno; /* save errno from opening dtfd */
|
||||
err = dtfd == -1 ? errno : 0; /* save errno from opening dtfd */
|
||||
#if defined(__FreeBSD__)
|
||||
/*
|
||||
* Automatically load the 'dtraceall' module if we couldn't open the
|
||||
|
Loading…
x
Reference in New Issue
Block a user