<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-dev/sound/isa/sb, branch master</title>
<subtitle>Linux kernel development work - see feature branches</subtitle>
<id>https://git.zx2c4.com/linux-dev/atom/sound/isa/sb?h=master</id>
<link rel='self' href='https://git.zx2c4.com/linux-dev/atom/sound/isa/sb?h=master'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/'/>
<updated>2022-09-29T06:11:55Z</updated>
<entry>
<title>ALSA: sb: Use DIV_ROUND_UP() instead of open-coding it</title>
<updated>2022-09-29T06:11:55Z</updated>
<author>
<name>Shang XiaoJing</name>
<email>shangxiaojing@huawei.com</email>
</author>
<published>2022-09-27T14:11:10Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=eefe77fdc0de86480f5dbb6bc721396d82d095d3'/>
<id>urn:sha1:eefe77fdc0de86480f5dbb6bc721396d82d095d3</id>
<content type='text'>
Use DIV_ROUND_UP() instead of open-coding it, which intents and makes
it more clear what is going on for the casual reviewer.

The Coccinelle references Commit e4d8aef21403 ("ALSA: usb: Use
DIV_ROUND_UP() instead of open-coding it").

Signed-off-by: Shang XiaoJing &lt;shangxiaojing@huawei.com&gt;
Link: https://lore.kernel.org/r/20220927141110.18033-1-shangxiaojing@huawei.com
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>Merge branch 'for-linus' into for-next</title>
<updated>2021-08-02T07:04:48Z</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2021-08-02T07:04:48Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=01099b1ad9101ca3f41071a87b9c496d9ea1d2ad'/>
<id>urn:sha1:01099b1ad9101ca3f41071a87b9c496d9ea1d2ad</id>
<content type='text'>
</content>
</entry>
<entry>
<title>ALSA: sb: Allocate resources with device-managed APIs</title>
<updated>2021-07-19T14:17:14Z</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2021-07-15T07:59:16Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=5eab6cb0344d06dc654f3f98a44359e07fc98179'/>
<id>urn:sha1:5eab6cb0344d06dc654f3f98a44359e07fc98179</id>
<content type='text'>
This patch converts the resource management in ISA sb drivers with
devres as a clean up.  Each manual resource management is converted
with the corresponding devres helper, and the card object release is
managed now via card-&gt;private_free instead of a lowlevel snd_device.

This should give no user-visible functional changes.

Link: https://lore.kernel.org/r/20210715075941.23332-55-tiwai@suse.de
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: sb: Fix potential ABBA deadlock in CSP driver</title>
<updated>2021-07-17T07:55:10Z</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2021-07-16T13:27:23Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=1c2b9519159b470ef24b2638f4794e86e2952ab7'/>
<id>urn:sha1:1c2b9519159b470ef24b2638f4794e86e2952ab7</id>
<content type='text'>
SB16 CSP driver may hit potentially a typical ABBA deadlock in two
code paths:

 In snd_sb_csp_stop():
     spin_lock_irqsave(&amp;p-&gt;chip-&gt;mixer_lock, flags);
     spin_lock(&amp;p-&gt;chip-&gt;reg_lock);

 In snd_sb_csp_load():
     spin_lock_irqsave(&amp;p-&gt;chip-&gt;reg_lock, flags);
     spin_lock(&amp;p-&gt;chip-&gt;mixer_lock);

Also the similar pattern is seen in snd_sb_csp_start().

Although the practical impact is very small (those states aren't
triggered in the same running state and this happens only on a real
hardware, decades old ISA sound boards -- which must be very difficult
to find nowadays), it's a real scenario and has to be fixed.

This patch addresses those deadlocks by splitting the locks in
snd_sb_csp_start() and snd_sb_csp_stop() for avoiding the nested
locks.

Reported-by: Jia-Ju Bai &lt;baijiaju1990@gmail.com&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Link: https://lore.kernel.org/r/7b0fcdaf-cd4f-4728-2eae-48c151a92e10@gmail.com
Link: https://lore.kernel.org/r/20210716132723.13216-1-tiwai@suse.de
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>Merge tag 'asoc-fix-v5.13-rc7' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next</title>
<updated>2021-06-24T08:02:45Z</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2021-06-24T08:02:45Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=5c89c2c7fbfa9124dd521c375b9c82b9ed75bc28'/>
<id>urn:sha1:5c89c2c7fbfa9124dd521c375b9c82b9ed75bc28</id>
<content type='text'>
ASoC: Fixes for v5.13

A final batch of fixes for v5.13, this is larger than I'd like due to
the fixes for a series of suspend issues that Intel turned up in their
testing this week.
</content>
</entry>
<entry>
<title>ALSA: sb: Fix potential double-free of CSP mixer elements</title>
<updated>2021-06-09T15:29:38Z</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2021-06-08T14:04:37Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=c305366a37441c2ac90b08711cb6f032b43672f2'/>
<id>urn:sha1:c305366a37441c2ac90b08711cb6f032b43672f2</id>
<content type='text'>
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 &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: sb: Minor coding style fixes</title>
<updated>2021-06-09T15:29:37Z</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2021-06-08T14:04:36Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=36e7b12b219dc30a4db046756d81745bc9d69167'/>
<id>urn:sha1:36e7b12b219dc30a4db046756d81745bc9d69167</id>
<content type='text'>
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 &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: sb: Fix assignment in if condition</title>
<updated>2021-06-09T15:29:35Z</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2021-06-08T14:04:35Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=10dc8ad5ffe8350d71e244b27900a1939d255fe7'/>
<id>urn:sha1:10dc8ad5ffe8350d71e244b27900a1939d255fe7</id>
<content type='text'>
A lot of code for SB drivers is in a legacy style with assignment in
if condition.  This also made harder to catch some bugs (e.g. the
commit 1c98f574403d "ALSA: emu8000: Fix a use after free in
snd_emu8000_create_mixer").

This patch fixes the coding style.  All are rather simple conversions
and there should be no functional changes.
(The changes in snd_emu8000_new() for hw-&gt;res_port1, 2 and 3 are
 slightly different from the older ones, but this shouldn't matter
 much in practice.)

Link: https://lore.kernel.org/r/20210608140540.17885-2-tiwai@suse.de
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: sb8: Add a comment note regarding an unused pointer</title>
<updated>2021-05-13T15:33:49Z</updated>
<author>
<name>Atul Gopinathan</name>
<email>atulgopinathan@gmail.com</email>
</author>
<published>2021-05-03T11:57:02Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=a28591f61b60fac820c6de59826ffa710e5e314e'/>
<id>urn:sha1:a28591f61b60fac820c6de59826ffa710e5e314e</id>
<content type='text'>
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 &lt;tiwai@suse.de&gt;
Signed-off-by: Atul Gopinathan &lt;atulgopinathan@gmail.com&gt;
Link: https://lore.kernel.org/r/20210503115736.2104747-36-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Revert "ALSA: sb8: add a check for request_region"</title>
<updated>2021-05-13T15:33:47Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2021-05-03T11:57:01Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=94f88309f201821073f57ae6005caefa61bf7b7e'/>
<id>urn:sha1:94f88309f201821073f57ae6005caefa61bf7b7e</id>
<content type='text'>
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 &lt;kjlu@umn.edu&gt;
Acked-by: Takashi Iwai &lt;tiwai@suse.de&gt;
Fixes: dcd0feac9bab ("ALSA: sb8: add a check for request_region")
Cc: stable &lt;stable@vger.kernel.org&gt;
Link: https://lore.kernel.org/r/20210503115736.2104747-35-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
