c305366a | 08-Jun-2021 |
Takashi Iwai <tiwai@suse.de> |
ALSA: sb: Fix potential double-free of CSP mixer elements
snd_sb_qsound_destroy() contains the calls of removing the previously created mixer controls, but it doesn't clear the pointers. As snd_sb_
ALSA: sb: Fix potential double-free of CSP mixer elements
snd_sb_qsound_destroy() contains the calls of removing the previously created mixer controls, but it doesn't clear the pointers. As snd_sb_qsound_destroy() itself may be repeatedly called via ioctl, this could lead to double-free potentially.
Fix it by clearing the struct fields properly afterwards.
Link: https://lore.kernel.org/r/20210608140540.17885-4-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
show more ...
|
36e7b12b | 08-Jun-2021 |
Takashi Iwai <tiwai@suse.de> |
ALSA: sb: Minor coding style fixes
The handling of snd_ctl_new1() and snd_ctl_add() can be sometimes tricky, as snd_ctl_add() automatically removes the passed object at its error path. The recent f
ALSA: sb: Minor coding style fixes
The handling of snd_ctl_new1() and snd_ctl_add() can be sometimes tricky, as snd_ctl_add() automatically removes the passed object at its error path. The recent fix addressed an overlooked issue that is relevant with that in SB driver code, and it can be a bit more simplified by assigning to a temporary variable, i.e. storing to the struct field only after the creation succeeds.
Link: https://lore.kernel.org/r/20210608140540.17885-3-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
show more ...
|
a28591f6 | 03-May-2021 |
Atul Gopinathan <atulgopinathan@gmail.com> |
ALSA: sb8: Add a comment note regarding an unused pointer
The field "fm_res" of "struct snd_sb8" is never used/dereferenced throughout the sb8.c code. Therefore there is no need for any null value c
ALSA: sb8: Add a comment note regarding an unused pointer
The field "fm_res" of "struct snd_sb8" is never used/dereferenced throughout the sb8.c code. Therefore there is no need for any null value check after the "request_region()".
Add a comment note to make developers know about this and prevent any "NULL check" patches on this part of code.
Cc: Takashi Iwai <tiwai@suse.de> Signed-off-by: Atul Gopinathan <atulgopinathan@gmail.com> Link: https://lore.kernel.org/r/20210503115736.2104747-36-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
show more ...
|
94f88309 | 03-May-2021 |
Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
Revert "ALSA: sb8: add a check for request_region"
This reverts commit dcd0feac9bab901d5739de51b3f69840851f8919.
Because of recent interactions with developers from @umn.edu, all commits from them
Revert "ALSA: sb8: add a check for request_region"
This reverts commit dcd0feac9bab901d5739de51b3f69840851f8919.
Because of recent interactions with developers from @umn.edu, all commits from them have been recently re-reviewed to ensure if they were correct or not.
Upon review, this commit was found to be incorrect for the reasons below, so it must be reverted. It will be fixed up "correctly" in a later kernel change.
The original commit message for this change was incorrect as the code path can never result in a NULL dereference, alluding to the fact that whatever tool was used to "find this" is broken. It's just an optional resource reservation, so removing this check is fine.
Cc: Kangjie Lu <kjlu@umn.edu> Acked-by: Takashi Iwai <tiwai@suse.de> Fixes: dcd0feac9bab ("ALSA: sb8: add a check for request_region") Cc: stable <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20210503115736.2104747-35-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
show more ...
|