| df27c927 | 16-Dec-2025 |
Takashi Iwai <tiwai@suse.de> |
ALSA: seq: oss: Relax __free() variable declarations
We used to have a variable declaration with __free() initialized with NULL. This was to keep the old coding style rule, but recently it's relaxe
ALSA: seq: oss: Relax __free() variable declarations
We used to have a variable declaration with __free() initialized with NULL. This was to keep the old coding style rule, but recently it's relaxed and rather recommends to follow the new rule to declare in place of use for __free() -- which avoids potential deadlocks or UAFs with nested cleanups.
Although the current code has no bug, per se, let's follow the new standard and move the declaration to the place of assignment (or directly assign the allocated result) instead of NULL initializations.
Fixes: 80ccbe91adab ("ALSA: seq: oss/synth: Clean up with guard and auto cleanup") Fixes: 895a46e034f9 ("ALSA: seq: oss/midi: Cleanup with guard and auto-cleanup") Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/20251216140634.171890-6-tiwai@suse.de
show more ...
|
| da24e6b3 | 27-Aug-2025 |
Takashi Iwai <tiwai@suse.de> |
ALSA: seq: oss/rw: Cleanup with guard
Replace the manual spin lock/unlock pairs with guard() for code simplification.
Only code refactoring, and no behavior change.
Signed-off-by: Takashi Iwai <ti
ALSA: seq: oss/rw: Cleanup with guard
Replace the manual spin lock/unlock pairs with guard() for code simplification.
Only code refactoring, and no behavior change.
Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/20250827080520.7544-12-tiwai@suse.de
show more ...
|
| 80ccbe91 | 27-Aug-2025 |
Takashi Iwai <tiwai@suse.de> |
ALSA: seq: oss/synth: Clean up with guard and auto cleanup
Use the auto-cleanup for the refcount management of seq_oss_synth object. The explicit call of snd_use_lock_free() is dropped by the magic
ALSA: seq: oss/synth: Clean up with guard and auto cleanup
Use the auto-cleanup for the refcount management of seq_oss_synth object. The explicit call of snd_use_lock_free() is dropped by the magic __free(seq_oss_synth) attribute.
Along with that, replace the manual mutex and spin locks with guard().
Only code refactoring, and no behavior change.
Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/20250827080520.7544-11-tiwai@suse.de
show more ...
|
| 895a46e0 | 27-Aug-2025 |
Takashi Iwai <tiwai@suse.de> |
ALSA: seq: oss/midi: Cleanup with guard and auto-cleanup
Use the auto-cleanup for the refcount management of seq_oss_midi object. The explicit call of snd_use_lock_free() is dropped by the magic __
ALSA: seq: oss/midi: Cleanup with guard and auto-cleanup
Use the auto-cleanup for the refcount management of seq_oss_midi object. The explicit call of snd_use_lock_free() is dropped by the magic __free(seq_oss_midi) attribute.
Along with that, replace the manual mutex and spin locks with guard().
Only code refactoring, and no behavior change.
Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/20250827080520.7544-10-tiwai@suse.de
show more ...
|
| 20ce9ded | 31-Dec-2024 |
Takashi Iwai <tiwai@suse.de> |
ALSA: seq: oss: Send fragmented SysEx messages immediately
The recent bug report spotted on the old OSS sequencer code that tries to combine incoming SysEx messages to a single sequencer event. Thi
ALSA: seq: oss: Send fragmented SysEx messages immediately
The recent bug report spotted on the old OSS sequencer code that tries to combine incoming SysEx messages to a single sequencer event. This is good, per se, but it has more demerits:
- The sysex message delivery is delayed until the very last event - The use of internal buffer forced the serialization
The recent fix in commit 0179488ca992 ("ALSA: seq: oss: Fix races at processing SysEx messages") addressed the latter, but a better fix is to handle the sysex messages immediately, i.e. just send each incoming fragmented sysex message as is. And this patch implements that. This resulted in a significant cleanup as well.
Note that the only caller of snd_seq_oss_synth_sysex() is snd_seq_oss_process_event(), and all its callers dispatch the event immediately, so we can just put the passed buffer pointer to the event record to be handled.
Reported-and-tested-by: Kun Hu <huk23@m.fudan.edu.cn> Link: https://lore.kernel.org/2B7E93E4-B13A-4AE4-8E87-306A8EE9BBB7@m.fudan.edu.cn Link: https://patch.msgid.link/20241231115523.15796-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
show more ...
|
| b62c563f | 13-Mar-2022 |
Julia Lawall <Julia.Lawall@inria.fr> |
ALSA: seq: oss: fix typo
Fix typo in "announcement".
Reported-by: Joe Perches <joe@perches.com> Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr> Link: https://lore.kernel.org/r/20220313085635.10
ALSA: seq: oss: fix typo
Fix typo in "announcement".
Reported-by: Joe Perches <joe@perches.com> Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr> Link: https://lore.kernel.org/r/20220313085635.102123-1-Julia.Lawall@inria.fr Signed-off-by: Takashi Iwai <tiwai@suse.de>
show more ...
|