mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-21 11:13:30 +00:00
MFV r283512:
3599 dtrace_dynvar tail calls can blow stack Reviewed by: Adam Leventhal <ahl@delphix.com> Reviewed by: Gordon Ross <gordon.ross@nexenta.com> Approved by: Richard Lowe <richlowe@richlowe.net> Author: Bryan Cantrill <bryan@joyent.com> illumos/illumos-gate@d47448f09a
This commit is contained in:
commit
2275da185c
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=287641
@ -23,7 +23,7 @@
|
||||
|
||||
/*
|
||||
* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2013, Joyent, Inc. All rights reserved.
|
||||
* Copyright (c) 2015, Joyent, Inc. All rights reserved.
|
||||
* Copyright (c) 2012, 2014 by Delphix. All rights reserved.
|
||||
*/
|
||||
|
||||
@ -2146,7 +2146,7 @@ dtrace_dynvar(dtrace_dstate_t *dstate, uint_t nkeys,
|
||||
* this hash chain, or another CPU is deleting an element from this
|
||||
* hash chain. The simplest way to deal with both of these cases
|
||||
* (though not necessarily the most efficient) is to free our
|
||||
* allocated block and tail-call ourselves. Note that the free is
|
||||
* allocated block and re-attempt it all. Note that the free is
|
||||
* to the dirty list and _not_ to the free list. This is to prevent
|
||||
* races with allocators, above.
|
||||
*/
|
||||
@ -2159,7 +2159,7 @@ dtrace_dynvar(dtrace_dstate_t *dstate, uint_t nkeys,
|
||||
dvar->dtdv_next = free;
|
||||
} while (dtrace_casptr(&dcpu->dtdsc_dirty, free, dvar) != free);
|
||||
|
||||
return (dtrace_dynvar(dstate, nkeys, key, dsize, op, mstate, vstate));
|
||||
goto top;
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
|
Loading…
Reference in New Issue
Block a user