Repository navigation
ASoC: topology: Use the correct dobj to free enum control values and … - #786
Conversation
plbossart
left a comment
There was a problem hiding this comment.
Sorry, the commit message isn't easy to follow and requires too much understanding of topology internals. Please try to reword it in a 'topology for dummies' style. There are fewer than 10 people in the universe that can understand that stuff.
@plbossart how does it read now? I thought this would be an obvious error to fix but apparently not. Please let me know if it makes better sense to readers now |
|
Thanks @ranj063, but still too many words and convoluted explanations. How about this: The control values and texts of the enum kcontrol associated with a widget need to be freed when the widget is removed. However both struct snd_soc_dapm_widget and struct soc_enum contain The suggested fix is to use the correct dobj member (se->dobj) of the enum kcontrol |
…texts The control values and texts of the enum kcontrol associated with a widget need to be freed when the widget is removed. However, both struct snd_soc_dapm_widget and struct soc_enum contain a dobj member, which resulted in a confusion. The existing code generates a null pointer dereference by attempting to free the values and texts from the dobj which belongs to the widget instead of the dobj belonging to the enum kcontrol. The suggested fix is to use the correct dobj member (se->dobj) of the enum kcontrol. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
kv2019i
left a comment
There was a problem hiding this comment.
Seems like a clear bug and the description is now easy to follow (with limited topology experience).
@plbossart I already sent it out last night. |
…texts
"dobj" is the widget dobj. dvalues and dtexts belong to the enum
kcontrol's dobj (se->dobj). So, use this to free the control values
and texts to prevent the NULL pointer dereference while removing
widgets.
Signed-off-by: Ranjani Sridharan ranjani.sridharan@linux.intel.com