Skip to content

hwmon: (lenovo-ec-sensors): Fix EC signature validation and I/O resource management

Kean Ren linux-hwmon lkml sashiko-reviews 2 versions – Applied

Status from this message: Applied.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest2 patches 3 repliesApplied
  2. v22 patches 3 repliesSuperseded

Changes in v3 from the cover letter

- Corrected bug description and Remove unnecessary {}.
- Reproduce patch 0002 based 0001 changed.

Patches in v3 Applied

#Subject and filesSizeRepliesApplied
1/2hwmon: (lenovo-ec-sensors): Convert to devm_request_region()drivers/hwmon/lenovo-ec-sensors.c+4 -101 reply
2/2hwmon: (lenovo-ec-sensors): Fix EC "MCHP" signature validation logicdrivers/hwmon/lenovo-ec-sensors.c+3 -32 replies

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchMark Pearson
1/2R-b
2/2R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 0/2] hwmon: (lenovo-ec-sensors): Fix EC signature validation and I/O resource management

Hi Guenter,

Thank you for your patient review.
This is v3 of the lenovo-ec-sensors fix series.

Changes from v2:

- Corrected bug description and Remove unnecessary {}.
- Reproduce patch 0002 based 0001 changed.

Patch 1 converts manual request_region()/release_region() calls to devm_request_region(), eliminating a double-release on the probe error path and a release-after-use window on module exit.

Patch 2 fixes the EC "MCHP" signature check that used && instead of ||, which caused the validation to accept a non-Microchip EC if any single byte of the expected 4-byte signature happened to match.

Both patches apply cleanly against v7.1-rc3 and pass checkpatch with 0 errors, 0 warnings.

Kean Ren (2):
hwmon: (lenovo-ec-sensors): Convert to devm_request_region()
hwmon: (lenovo-ec-sensors): Fix EC "MCHP" signature validation logic

 drivers/hwmon/lenovo-ec-sensors.c | 20 +++++++-------------
 1 file changed, 7 insertions(+), 13 deletions(-)
Signature · 1 line
2.53.0