Bug #11927
closedLog, or optionally panic, on zero-length kmem allocations
100%
Description
Joyent bug OS-4297 implements a tracking of zero-length kmem allocations in the kernel. We generally want to discourage these.
Additional fixes to that are needed, and are filed-but-not-fixed as Joyent bug OS-8018. This upstream-it bug should contain both.
Related issues
Updated by Marcel Telka over 3 years ago
- Related to Bug #11928: rpcmod's clnt_cots can do zero-length kmem allocations added
Updated by Marcel Telka over 3 years ago
From the kmem_alloc(9f)
man page:
NOTES kmem_alloc(0, flag) always returns NULL. kmem_free(NULL, 0) is legal.
Updated by Dan McDonald over 3 years ago
This is actually three SmartOS bugs, OS-4194 (initial change with cleanups), OS-8018 (not yet fixed), AND OS-4297 (reduction to log-only in DEBUG by default, vs. panic).
These fixes have been in SmartOS since August of 2015.
commit 92d00144d1e2f01ebc15a0099c0a06a8210c7ccb
Author: Bryan Cantrill <bryan@joyent.com>
AuthorDate: Fri Jul 31 07:14:02 2015 +0000
Commit: Bryan Cantrill <bryan@joyent.com>
CommitDate: Fri Jul 31 07:14:02 2015 +0000
OS-4297 zero-sized allocations should be logged but not warned about
Updated by Dan McDonald over 3 years ago
Additionally, this code was additionally tested by the DEBUG smoke-testing of nfs-zone. Apart from fixes in #11928, there were no other zero-allocation noises (because of the accompanying fixes in kernel code in this wad).
Updated by Electric Monk over 3 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100
git commit d15801816cc716b56ada92df72ee04b7b891291c
commit d15801816cc716b56ada92df72ee04b7b891291c Author: Bryan Cantrill <bryan@joyent.com> Date: 2019-11-21T15:57:15.000Z 11927 Log, or optionally panic, on zero-length kmem allocations Reviewed by: Dan McDonald <danmcd@joyent.com> Reviewed by: Jason King <jason.brian.king@gmail.com> Approved by: Gordon Ross <gordon.w.ross@gmail.com>