Skip to content

Commit 66cb3a2

Browse files
darcarijwrdegoede
authored andcommitted
platform/x86/intel: Fix pmt_crashlog array reference
The probe function pmt_crashlog_probe() may incorrectly reference the 'priv->entry array' as it uses 'i' to reference the array instead of 'priv->num_entries' as it should. This is similar to the problem that was addressed in pmt_telemetry_probe via commit 2cdfa0c ("platform/x86/intel: Fix 'rmmod pmt_telemetry' panic"). Cc: "David E. Box" <[email protected]> Cc: Hans de Goede <[email protected]> Cc: Mark Gross <[email protected]> Cc: [email protected] Signed-off-by: David Arcari <[email protected]> Reviewed-by: David E. Box <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Hans de Goede <[email protected]>
1 parent b9c29f3 commit 66cb3a2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/platform/x86/intel/pmt/crashlog.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ static int pmt_crashlog_probe(struct auxiliary_device *auxdev,
282282
auxiliary_set_drvdata(auxdev, priv);
283283

284284
for (i = 0; i < intel_vsec_dev->num_resources; i++) {
285-
struct intel_pmt_entry *entry = &priv->entry[i].entry;
285+
struct intel_pmt_entry *entry = &priv->entry[priv->num_entries].entry;
286286

287287
ret = intel_pmt_dev_create(entry, &pmt_crashlog_ns, intel_vsec_dev, i);
288288
if (ret < 0)

0 commit comments

Comments
 (0)