Skip to content

soc/tegra: fuse: Fix SMCCC and probe error paths

Jiangtian Feng linux-tegra 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3soc/tegra: fuse: Fix NULL dereference when APBMISC is unavailabledrivers/soc/tegra/fuse/tegra-apbmisc.c+2 -10 replies
2/3soc/tegra: fuse: Clean up nvmem lookups on probe failuredrivers/soc/tegra/fuse/fuse-tegra.c+13 -00 replies
3/3soc/tegra: fuse: Handle unknown platform IDs safelydrivers/soc/tegra/fuse/fuse-tegra.c+7 -40 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3] soc/tegra: fuse: Fix SMCCC and probe error paths

This series fixes three error paths in the Tegra fuse driver:

- avoid dereferencing a NULL APBMISC mapping in tegra_read_chipid();
- remove and free nvmem lookups when probe fails or resources are released;
- avoid indexing tegra_platform_name[] with an unknown platform ID.

The first two issues were introduced by the SMCCC and probe-time lookup changes. The platform bounds issue predates SMCCC, whose wider platform field increases the range of invalid values.

AI assistance disclosure:
Qoder AI coding assistant was used with the Kitta review findings and the relevant ANCK/mainline source as inputs. It contributed to the problem analysis, code changes, and changelog drafts. checkpatch.pl and make were used for local validation. The human submitter reviewed the complete series and added their own Signed-off-by tags.

Validation:
- patches apply to torvalds/linux master 8d7fe9885c62 (7.4.0-rc4);
- current mainline sources are identical to the base for both touched files;
- independent review found no High/Medium/Low code defects;
- checkpatch.pl reports 0 errors and 0 warnings for each signed patch;
- drivers/soc/tegra/fuse/ builds on aarch64 defconfig;
- a complete aarch64 defconfig Image builds successfully with SHA-256 8e35101c2745bd2d64ebad1065685c4d76b662d154d411a34d391820bd1f2c60;
- the final tree is e35c03a0ccbe95b1d49caeeb713b5019adbefec7;
- the three fixes also built previously in the ANCK devel-6.6-arm tree.

NOT_RUN:
- runtime APBMISC mapping failure injection;
- runtime probe-defer retry and lookup lifetime validation;
- Vera hardware and ECS workloads.

Jiangtian Feng (3):
soc/tegra: fuse: Fix NULL dereference when APBMISC is unavailable soc/tegra: fuse: Clean up nvmem lookups on probe failure soc/tegra: fuse: Handle unknown platform IDs safely

 drivers/soc/tegra/fuse/fuse-tegra.c    | 24 ++++++++++++++++++++----
 drivers/soc/tegra/fuse/tegra-apbmisc.c |  3 ++-
 2 files changed, 22 insertions(+), 5 deletions(-)

base-commit: 8d7fe9885c62fc9a95bf55d9db244d9672a8aadc

Signature · 1 line
2.47.3