aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/kern_fail.c
Commit message (Collapse)AuthorAgeFilesLines
* Replace random sbuf_printf() with cheaper cat/putc.Alexander Motin2023-11-221-6/+6
|
* sys: Remove $FreeBSD$: one-line .c patternWarner Losh2023-08-161-2/+0
| | | | Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
* spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSDWarner Losh2023-05-121-1/+1
| | | | | | | | | The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of BSD-2-Clause. Discussed with: pfg MFC After: 3 days Sponsored by: Netflix
* kern: clean up empty lines in .c and .h filesMateusz Guzik2020-09-011-1/+0
| | | | Notes: svn path=/head/; revision=365222
* Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many)Pawel Biernacki2020-02-261-3/+5
| | | | | | | | | | | | | | | | | | | r357614 added CTLFLAG_NEEDGIANT to make it easier to find nodes that are still not MPSAFE (or already are but aren’t properly marked). Use it in preparation for a general review of all nodes. This is non-functional change that adds annotations to SYSCTL_NODE and SYSCTL_PROC nodes using one of the soon-to-be-required flags. Mark all obvious cases as MPSAFE. All entries that haven't been marked as MPSAFE before are by default marked as NEEDGIANT Approved by: kib (mentor, blanket) Commented by: kib, gallatin, melifaro Differential Revision: https://reviews.freebsd.org/D23718 Notes: svn path=/head/; revision=358333
* Use callout(9) instead of deprecated timeout(9) for fail points.John Baldwin2019-12-131-2/+22
| | | | | | | | | | | | Allocate the callout structure on-demand from fail_point_use_timeout_path() since most fail points do not use timeouts. Reviewed by: markj (earlier version), cem Differential Revision: https://reviews.freebsd.org/D22599 Notes: svn path=/head/; revision=355725
* sys/kern: adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-271-0/+2
| | | | | | | | | | | | | | | Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - error prone - task. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. Notes: svn path=/head/; revision=326271
* Avoid open-coding PRI_UNCHANGED.Mark Johnston2017-05-181-1/+1
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=318476
* kern_fail: Allow sleeping for more than 2147483/hz secondsConrad Meyer2017-03-211-1/+1
| | | | | | | | | | | | | Because of integer types, the timeout calculation result was limited to INT_MAX / (1000 * hz) seconds. For systems with hz=10000, this is only 215 seconds. Perform the calculation with 64-bit math to allow sleeping for the full INT_MAX / hz interval (215000 seconds on such hz=10000 systems). Submitted by: Scott Ferris <sferris at isilon.com> Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=315693
* Fix some cosmetic issues in kern_fail.c omitted from r296927.Mark Johnston2016-06-091-15/+11
| | | | | | | Obtained from: Matthew Bryan <matthew.bryan@isilon.com> Notes: svn path=/head/; revision=301727
* fail(9): Only gather/print stacks if STACK is enabledConrad Meyer2016-03-171-0/+6
| | | | | | | | | | This is a follow-up fix to the earlier r296927. Reported by: bz Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=296973
* fail(9): Upstreaming some fail point enhancementsConrad Meyer2016-03-161-133/+643
| | | | | | | | | | | | | | | | | | | | | | | | This is several year's worth of fail point upgrades done at EMC Isilon. They are interdependent enough that it makes sense to put a single diff up for them. Primarily, we added: - Changing all mainline execution paths to be lockless, which lets us use fail points in more sleep-sensitive areas, and allows more parallel execution - A number of additional commands, including 'pause' that lets us do some interesting deterministic repros of race conditions - The ability to dump the stacks of all threads sleeping on a fail point - A number of other API changes to allow marking up the fail point's context in the code, and firing callbacks before and after execution - A man page update Submitted by: Matthew Bryan <matthew.bryan@isilon.com> Reviewed by: cem (earlier version), jhb, kib, pho With feedback from: bdrewery Sponsored by: EMC / Isilon Storage Division Differential Revision: https://reviews.freebsd.org/D5427 Notes: svn path=/head/; revision=296927
* Use a regular sbuf + SYSCTL_OUT() rather than sbuf_new_for_sysctl() withIan Lepore2015-03-161-1/+3
| | | | | | | | | | auto-draining, to avoid a potential copyout fault while holding a lock. Pointed out by: jhb Pointy hat to: ian Notes: svn path=/head/; revision=280150
* Use sbuf_new_for_sysctl() instead of plain sbuf_new() to ensure sysctlIan Lepore2015-03-141-3/+2
| | | | | | | | | string returned to userland is nulterminated. PR: 195668 Notes: svn path=/head/; revision=280000
* Mark MALLOC_DEFINEs static that have no corresponding MALLOC_DECLAREs.Ed Schouten2011-11-071-1/+1
| | | | | | | This means that their use is restricted to a single C file. Notes: svn path=/head/; revision=227293
* Add an option to have a fail point term only execute when run by aMatthew D Fleming2011-07-081-1/+19
| | | | | | | | | | specified pid. This is helpful for automated testing involving a global knob that would otherwise be executed by many other threads. MFC after: 1 week Notes: svn path=/head/; revision=223876
* style(9) and cleanup fixes.Matthew D Fleming2011-07-081-80/+69
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=223875
* Initialize fp_location for explicitly managed fail points, and pushMatthew D Fleming2010-12-211-2/+3
| | | | | | | | | | | | | | | | | | the parentheses around the location for simple fail points into the location string. This makes the print on fail point set more consistent between the two versions. Also fix up fail.h a little for style(9): only use one of sys/param.h and sys/types.h, and use the existing __XSTRING() macro instead of rolling our own. Also fix up a few tabs on changed and nearby lines. Lastly, since KFAIL_POINT_{BEGIN,END} are not meant for use outside this file, just eliminate the macros entirely. MFC after: 1 week Notes: svn path=/head/; revision=216620
* Move the fail_point_entry definition from fail.h to kern_fail.c, whichMatthew D Fleming2010-12-211-9/+37
| | | | | | | | | | allows putting the enumeration constants of fail point types with the text string that matches them. MFC after: 1 week Notes: svn path=/head/; revision=216616
* Remove extraneous semicolons, no functional changes.Martin Blapp2010-01-071-2/+2
| | | | | | | | Submitted by: Marc Balmer <marc@msys.ch> MFC after: 1 week Notes: svn path=/head/; revision=201758
* fail(9) support:Zachary Loafman2009-05-271-0/+575
Add support for kernel fault injection using KFAIL_POINT_* macros and fail_point_* infrastructure. Add example fail point in vfs_bio.c to simulate VM buf pressure. Approved by: dfr (mentor) Notes: svn path=/head/; revision=192908