mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-05 00:20:32 +00:00
ALSA: firewire: fix NULL pointer dereference when releasing uninitialized data of iso-resource
commit0c264af7be
upstream. When calling 'iso_resource_free()' for uninitialized data, this function causes NULL pointer dereference due to its 'unit' member. This occurs when unplugging audio and music units on IEEE 1394 bus at failure of card registration. This commit fixes the bug. The bug exists since kernel v4.5. Fixes:324540c4e0
('ALSA: fireface: postpone sound card registration') at v4.12 Fixes:8865a31e0f
('ALSA: firewire-motu: postpone sound card registration') at v4.12 Fixes:b610386c8a
('ALSA: firewire-tascam: deleyed registration of sound card') at v4.7 Fixes:86c8dd7f4d
('ALSA: firewire-digi00x: delayed registration of sound card') at v4.7 Fixes:6c29230e2a
('ALSA: oxfw: delayed registration of sound card') at v4.7 Fixes:7d3c1d5901
('ALSA: fireworks: delayed registration of sound card') at v4.7 Fixes:04a2c73c97
('ALSA: bebob: delayed registration of sound card') at v4.7 Fixes:b59fb1900b
('ALSA: dice: postpone card registration') at v4.5 Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
b52bce93db
commit
6cba074685
1 changed files with 6 additions and 1 deletions
|
@ -210,9 +210,14 @@ EXPORT_SYMBOL(fw_iso_resources_update);
|
|||
*/
|
||||
void fw_iso_resources_free(struct fw_iso_resources *r)
|
||||
{
|
||||
struct fw_card *card = fw_parent_device(r->unit)->card;
|
||||
struct fw_card *card;
|
||||
int bandwidth, channel;
|
||||
|
||||
/* Not initialized. */
|
||||
if (r->unit == NULL)
|
||||
return;
|
||||
card = fw_parent_device(r->unit)->card;
|
||||
|
||||
mutex_lock(&r->mutex);
|
||||
|
||||
if (r->allocated) {
|
||||
|
|
Loading…
Reference in a new issue