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" <david.e.box@linux.intel.com> Cc: Hans de Goede <hdegoede@redhat.com> Cc: Mark Gross <markgross@kernel.org> Cc: linux-kernel@vger.kernel.org Signed-off-by: David Arcari <darcari@redhat.com> Reviewed-by: David E. Box <david.e.box@linux.intel.com> Link: https://lore.kernel.org/r/20220526203140.339120-1-darcari@redhat.com Signed-off-by: Hans de Goede <hdegoede@redhat.com>
1 parent b9c29f3 commit 66cb3a2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

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)