]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
ALSA: hda: tas2781: Fix wrong reference of tasdevice_priv
authorTakashi Iwai <tiwai@suse.de>
Wed, 20 Aug 2025 05:19:01 +0000 (07:19 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Aug 2025 14:34:35 +0000 (16:34 +0200)
commit 3f4422e7c9436abf81a00270be7e4d6d3760ec0e upstream.

During the conversion to unify the calibration data management, the
reference to tasdevice_priv was wrongly set to h->hda_priv instead of
h->priv.  This resulted in memory corruption and crashes eventually.
Unfortunately it's a void pointer, hence the compiler couldn't know
that it's wrong.

Fixes: 4fe238513407 ("ALSA: hda/tas2781: Move and unified the calibrated-data getting function for SPI and I2C into the tas2781_hda lib")
Link: https://bugzilla.suse.com/show_bug.cgi?id=1248270
Cc: <stable@vger.kernel.org>
Link: https://patch.msgid.link/20250820051902.4523-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/pci/hda/tas2781_hda_i2c.c

index d91eed9f7804328bf9464db233a31b712f3fa78c..8c5ebbe8a1f315bbe87c4b0ab3b089c6763568d4 100644 (file)
@@ -287,7 +287,7 @@ static int tas2563_save_calibration(struct tas2781_hda *h)
        efi_char16_t efi_name[TAS2563_CAL_VAR_NAME_MAX];
        unsigned long max_size = TAS2563_CAL_DATA_SIZE;
        unsigned char var8[TAS2563_CAL_VAR_NAME_MAX];
-       struct tasdevice_priv *p = h->hda_priv;
+       struct tasdevice_priv *p = h->priv;
        struct calidata *cd = &p->cali_data;
        struct cali_reg *r = &cd->cali_reg_array;
        unsigned int offset = 0;