[PATCH 1/9] ALSA: hda: Do not unset preset when cleaning up codec
Takashi Iwai
tiwai at suse.de
Sat Jul 9 18:34:36 CEST 2022
On Wed, 06 Jul 2022 14:02:22 +0200,
Cezary Rojewski wrote:
>
> snd_hda_codec_cleanup_for_unbind() unsets preset what interferes with
> module unloading and triggers null-ptr-deref. Preset is assigned only
> once, during device/driver matching whereas module reload and unload
> follow completely different path and may occur several times during
> runtime.
Hm, the driver reload/unload does unbind. Keeping this field mean to
leave the pointer to the possibly freed object, no?
And if it's not cleared, where is this field cleared instead?
thanks,
Takashi
More information about the Alsa-devel
mailing list