summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/bin/stackcollapse-report
diff options
context:
space:
mode:
authorPriya Bala Govindasamy <pgovind2@uci.edu>2026-07-20 18:00:58 +0000
committerViresh Kumar <viresh.kumar@linaro.org>2026-08-06 11:54:41 +0530
commit19c76bdd3fc02475c73c8576f6f4a55ff07886f1 (patch)
treefc4e146c95cafc123a4044d48b5b4c2c543107c4 /tools/perf/scripts/python/bin/stackcollapse-report
parentb5e4771f20a37fdf19eac0824bf062dffb4e291f (diff)
rust: cpufreq: Fix temporary write in Registration::bios_limit_callback
In `Registration::bios_limit_callback`, the expression `&mut (unsafe { *limit })` creates a reference to a temporary copy of the value pointed to by `limit` on the stack. Therefore, writes made by `T::bios_limit` go to this temporary instead of the memory location pointed to by `limit`. Additionally, `limit` may be uninitialized, such as when `Registration::bios_limit_callback` is invoked by `show_bios_limit` in drivers/cpufreq/cpufreq.c. Therefore creating a reference to `limit` is unsound. Fix this by changing the signature of `T::bios_limit` to return the limit value. `Registration::bios_limit_callback` can then update `limit` directly. Fixes: c6af9a1191d042839e56abff69e8b0302d117988 ("rust: cpufreq: Extend abstractions for driver registration") Reported-by: Dylan Zueck<dzueck@uci.edu> Reported-by: Yuan Tan<ytan089@ucr.edu> Assisted-by: ChatGPT:gpt-5.4 Signed-off-by: Priya Bala Govindasamy<pgovind2@uci.edu> [ Viresh: Fix rustfmtcheck warning ] Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Diffstat (limited to 'tools/perf/scripts/python/bin/stackcollapse-report')
0 files changed, 0 insertions, 0 deletions