aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/flamegraph.py
diff options
context:
space:
mode:
authorAlyssa Ross <[email protected]>2024-09-07 18:00:26 +0200
committerKent Overstreet <[email protected]>2024-09-09 09:41:47 -0400
commita3ed1cc4136df01e74a8b6df8c562db69e752bad (patch)
tree91c954a64c5733d0b2c93f17db4867348d0cac23 /tools/perf/scripts/python/flamegraph.py
parent16005147cca41a0f67b5def2a4656286f8c0db4a (diff)
bcachefs: Fix negative timespecs
This fixes two problems in the handling of negative times: • rem is signed, but the rem * c->sb.nsec_per_time_unit operation produced a bogus unsigned result, because s32 * u32 = u32. • The timespec was not normalized (it could contain more than a billion nanoseconds). For example, { .tv_sec = -14245441, .tv_nsec = 750000000 }, after being round tripped through timespec_to_bch2_time and then bch2_time_to_timespec would come back as { .tv_sec = -14245440, .tv_nsec = 4044967296 } (more than 4 billion nanoseconds). Cc: [email protected] Fixes: 595c1e9bab7f ("bcachefs: Fix time handling") Closes: https://github.com/koverstreet/bcachefs/issues/743 Co-developed-by: Erin Shepherd <[email protected]> Signed-off-by: Erin Shepherd <[email protected]> Co-developed-by: Ryan Lahfa <[email protected]> Signed-off-by: Ryan Lahfa <[email protected]> Signed-off-by: Alyssa Ross <[email protected]> Signed-off-by: Kent Overstreet <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/flamegraph.py')
0 files changed, 0 insertions, 0 deletions