- sme_events_worker: use sme_list_mtx when accessing to the sysmon_envsys
linked list.
- Improve the comments in sysmon_envsysvar.h about the mutexes and condvar.
- Raise an error if renaming a file to a directory.
- Raise an error if renaming a directory to a file.
- Raise an error if renaming a directory to a non-empty directory.
- Properly allow renaming a directory to an empty directory.
The system could previously crash if the kernel had DIAGNOSTIC enabled,
as this triggered a bogus assertion.
Problem found by Geoff Wing.
1) Renaming a directory to an empty directory works by replacing the target
directory.
2) Renaming a directory to a non-empty directory fails.
This is all by calling rename(2) directly, not mv(1).
tmpfs currently fails those tests, raising an assertion if DIAGNOSTIC is
enabled. A fix will hopefully follow soon.
Found by pooka@.
in all cases to the caller, just continue and show a debug printf if it
fails, because it's not a critical error.
- Improve some debugging printfs.
Fixes another part of yamt@'s PR kern/36673, that I forgot to commit
yesterday.
setting vnode sizes, is handled elsewhere: file system vnode creation
or spec_open() for regular files or block special files, respectively.
Add a call to VOP_MMAP() to the pagedvn exec path, since the vnode
is being memory mapped.
reviewed by tech-kern & wrstuden
following test cases were fixed if a driver tries to register a driver
with sysmon_envsys_register() and the following items appear:
- Sensor with empty description.
- Sensor with state that doesn't match any of ENVSYS_SFOO.
- Sensor with units type that doesn't match any of ENVSYS_FOO.
it has supplied us). If we fault pages which are at offset >= server
size, but less than the in-kernel vnode size, inform the file server
of the latest developments in file size before issueing the fault.
The avoids confusion with files which are not written start to finish.
fixes kern/36429 by yamt
- There must be three mandatory objects in a sensor to be valid and be
enabled on its dictionary: units, state and desc. If any of these
objects fails for some reason, its dictionary won't created in the
array and sensor will be marked with ENVSYS_FNOTVALID in edata->flags.
That means there won't never be a partial dictionary.
- Mark all invalid sensors and sensors with duplicate description with
ENVSYS_FNOTVALID and remove ENVSYS_FDUPDESC. The former is the generic
way to say that a sensor does not obey the rules and must be not
created.
- sysmon_envsys_createplist: if the array does not contain any object,
release the array and return the error.
And with all that stuff I can go to holidays and be happy.
instead of the result from getcwd(). The works around locking
panics caused by namei calling VOP_READLINK while holding on to a
directory lock and getcwd() trying to acquire that lock. The real
fix would be to get rid of getcwd() calls within VOPs (not locking
safe), but that's not a viable option in the netbsd-4 timeframe.
Suggestion for workaround from David Holland.
in PR port-alpha/36628:
- make jensenio_eisa_maxslots() return 8 (instead of 16) since
EISA config for slot 8-15 on jensen could return invalid values
- pass eisa_chipset_tag_t to eisa_init() and check eisa_maxslots()
on probing EISA config space
- pass M_ZERO to malloc(9) and make sure malloc(9) doesn't fail
- fix typo in a debug printf, add more debug printfs, and
use #ifdef EISA_DEBUG to enable them
- cast uint8_t value to uint32_t before shift more than 8 bits
- check buffer region on reading compressed data from EISA config space