<feed xmlns='http://www.w3.org/2005/Atom'>
<title>wireguard-linux/sound/core, branch jd/orphan-parallel</title>
<subtitle>WireGuard for the Linux kernel</subtitle>
<id>https://git.zx2c4.com/wireguard-linux/atom/sound/core?h=jd%2Forphan-parallel</id>
<link rel='self' href='https://git.zx2c4.com/wireguard-linux/atom/sound/core?h=jd%2Forphan-parallel'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/'/>
<updated>2020-09-23T12:45:14Z</updated>
<entry>
<title>ALSA: seq: oss: Avoid mutex lock for a long-time ioctl</title>
<updated>2020-09-23T12:45:14Z</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2020-09-22T08:38:56Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=2759caad2600d503c3b0ed800e7e03d2cd7a4c05'/>
<id>urn:sha1:2759caad2600d503c3b0ed800e7e03d2cd7a4c05</id>
<content type='text'>
Recently we applied a fix to cover the whole OSS sequencer ioctls with
the mutex for dealing with the possible races.  This works fine in
general, but in theory, this may lead to unexpectedly long stall if an
ioctl like SNDCTL_SEQ_SYNC is issued and an event with the far future
timestamp was queued.

For fixing such a potential stall, this patch changes the mutex lock
applied conditionally excluding such an ioctl command.  Also, change
the mutex_lock() with the interruptible version for user to allow
escaping from the big-hammer mutex.

Fixes: 80982c7e834e ("ALSA: seq: oss: Serialize ioctls")
Suggested-by: Pavel Machek &lt;pavel@ucw.cz&gt;
Link: https://lore.kernel.org/r/20200922083856.28572-1-tiwai@suse.de
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: ctl: Workaround for lockdep warning wrt card-&gt;ctl_files_rwlock</title>
<updated>2020-09-22T09:07:10Z</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2020-09-22T08:49:53Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=6564d0ad67efb2d977e130e7448505ee538af016'/>
<id>urn:sha1:6564d0ad67efb2d977e130e7448505ee538af016</id>
<content type='text'>
The recent change in lockdep for read lock caused the deadlock
warnings in ALSA control code which uses the read_lock() for
notification and else while write_lock_irqsave() is used for adding
and removing the list entry.  Although a deadlock would practically
never hit in a real usage (the addition and the deletion can't happen
with the notification), it's better to fix the read_lock() usage in a
semantically correct way.

This patch replaces the read_lock() calls with read_lock_irqsave()
version for avoiding a reported deadlock.  The notification code path
takes the irq disablement in anyway, and other code paths are very
short execution, hence there shouldn't be any big performance hit by
this change.

Fixes: e918188611f0 ("locking: More accurate annotations for read_lock()")
Reported-by: syzbot+561a74f84100162990b2@syzkaller.appspotmail.com
Link: https://lore.kernel.org/r/20200922084953.29018-1-tiwai@suse.de
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: compat_ioctl: avoid compat_alloc_user_space</title>
<updated>2020-09-21T08:37:07Z</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2020-09-18T09:56:19Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=18d122c0287b29e70bc312a994c7ee79738cec77'/>
<id>urn:sha1:18d122c0287b29e70bc312a994c7ee79738cec77</id>
<content type='text'>
Using compat_alloc_user_space() tends to add complexity
to the ioctl handling, so I am trying to remove it everywhere.

The two callers in sound/core can rewritten to just call
the same code that operates on a kernel pointer as the
native handler.

Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Link: https://lore.kernel.org/r/20200918095642.1446243-1-arnd@arndb.de
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: timer: Replace tasklet with work</title>
<updated>2020-09-09T16:32:52Z</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2020-09-03T10:41:22Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=bf0835957f553aeddec896f3de386562536feee4'/>
<id>urn:sha1:bf0835957f553aeddec896f3de386562536feee4</id>
<content type='text'>
The tasklet is an old API that should be deprecated, usually can be
converted to another decent API.  In ALSA core timer API, the
callbacks can be offlined to a tasklet when a flag is set in the timer
backend.  It can be achieved gracefully with a work queued in the
high-prio system workqueue.

This patch replaces the usage of tasklet in ALSA timer API with a
simple work.  Currently the tasklet feature is used only in the system
timer and hrtimer backends, so both are patched to use the new flag
name SNDRV_TIMER_HW_WORK, too.

Link: https://lore.kernel.org/r/20200903104131.21097-3-tiwai@suse.de
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>Merge branch 'for-linus' into for-next</title>
<updated>2020-09-09T16:26:48Z</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2020-09-09T16:26:07Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=9ddb236f13594b34a12dacf69a5adca7a1aef35e'/>
<id>urn:sha1:9ddb236f13594b34a12dacf69a5adca7a1aef35e</id>
<content type='text'>
Back-merge to apply the tasklet conversion patches that are based
on the already applied tasklet API changes on 5.9-rc4.

Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: rawmidi: (cosmetic) align function parameters</title>
<updated>2020-09-03T07:27:44Z</updated>
<author>
<name>Pierre-Louis Bossart</name>
<email>pierre-louis.bossart@linux.intel.com</email>
</author>
<published>2020-09-02T21:21:30Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=93fcef86caafba893f2e13782f4c58b386eab311'/>
<id>urn:sha1:93fcef86caafba893f2e13782f4c58b386eab311</id>
<content type='text'>
fix cppcheck:

sound/core/rawmidi.c:1711:49: style:inconclusive: Function
'snd_rawmidi_free' argument 1 names different: declaration 'rawmidi'
definition 'rmidi'. [funcArgNamesDifferent]

Signed-off-by: Pierre-Louis Bossart &lt;pierre-louis.bossart@linux.intel.com&gt;
Link: https://lore.kernel.org/r/20200902212133.30964-16-pierre-louis.bossart@linux.intel.com
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: core: init: use DECLARE_COMPLETION_ONSTACK() macro</title>
<updated>2020-09-03T07:26:38Z</updated>
<author>
<name>Pierre-Louis Bossart</name>
<email>pierre-louis.bossart@linux.intel.com</email>
</author>
<published>2020-09-02T21:21:23Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=bec206db9db59cbc14993583288e7489e8ab02b1'/>
<id>urn:sha1:bec206db9db59cbc14993583288e7489e8ab02b1</id>
<content type='text'>
Follow recommendation in Documentation/scheduler/completion.rst and use
macro to declare local 'struct completion'

Signed-off-by: Pierre-Louis Bossart &lt;pierre-louis.bossart@linux.intel.com&gt;
Link: https://lore.kernel.org/r/20200902212133.30964-9-pierre-louis.bossart@linux.intel.com
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: compress_offload: remove redundant initialization</title>
<updated>2020-09-03T07:26:27Z</updated>
<author>
<name>Pierre-Louis Bossart</name>
<email>pierre-louis.bossart@linux.intel.com</email>
</author>
<published>2020-09-02T21:21:22Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=9725ce3949a7b3eebf003cb69fa0d7d821179233'/>
<id>urn:sha1:9725ce3949a7b3eebf003cb69fa0d7d821179233</id>
<content type='text'>
Fix cppcheck warning:

sound/core/compress_offload.c:1044:6: style: Redundant initialization
for 'ret'. The initialized value is overwritten before it is
read. [redundantInitialization]

 ret = snd_register_device(SNDRV_DEVICE_TYPE_COMPRESS,
     ^
sound/core/compress_offload.c:1034:10: note: ret is initialized
 int ret = -EINVAL;
         ^
sound/core/compress_offload.c:1044:6: note: ret is overwritten
 ret = snd_register_device(SNDRV_DEVICE_TYPE_COMPRESS,
     ^

Signed-off-by: Pierre-Louis Bossart &lt;pierre-louis.bossart@linux.intel.com&gt;
Acked-by: Vinod Koul &lt;vkoul@kernel.org&gt;
Link: https://lore.kernel.org/r/20200902212133.30964-8-pierre-louis.bossart@linux.intel.com
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: compress_offload: dereference after checking for NULL pointer</title>
<updated>2020-09-03T07:25:55Z</updated>
<author>
<name>Pierre-Louis Bossart</name>
<email>pierre-louis.bossart@linux.intel.com</email>
</author>
<published>2020-09-02T21:21:21Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=cd91fd9f0af5453e66bda9984916ca67686689cf'/>
<id>urn:sha1:cd91fd9f0af5453e66bda9984916ca67686689cf</id>
<content type='text'>
Fix cppcheck warning and only dereference once the initial checks are
done:

sound/core/compress_offload.c:516:38: warning: Either the condition
'!stream' is redundant or there is possible null pointer dereference:
stream. [nullPointerRedundantCheck]
 struct snd_compr_runtime *runtime = stream-&gt;runtime;
                                     ^
sound/core/compress_offload.c:518:17: note: Assuming that condition
'!stream' is not redundant
if (snd_BUG_ON(!(stream) || !(stream)-&gt;runtime))
                ^
sound/core/compress_offload.c:516:38: note: Null pointer dereference
 struct snd_compr_runtime *runtime = stream-&gt;runtime;
                                     ^

Signed-off-by: Pierre-Louis Bossart &lt;pierre-louis.bossart@linux.intel.com&gt;
Acked-by: Vinod Koul &lt;vkoul@kernel.org&gt;
Link: https://lore.kernel.org/r/20200902212133.30964-7-pierre-louis.bossart@linux.intel.com
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: core: timer: clarify operator precedence</title>
<updated>2020-09-03T07:25:26Z</updated>
<author>
<name>Pierre-Louis Bossart</name>
<email>pierre-louis.bossart@linux.intel.com</email>
</author>
<published>2020-09-02T21:21:20Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=3bcf8eeb7d979402d3db96fb58bed456a3c66668'/>
<id>urn:sha1:3bcf8eeb7d979402d3db96fb58bed456a3c66668</id>
<content type='text'>
fix cppcheck warning:

sound/core/timer.c:1286:9: style: Clarify calculation precedence for
'&amp;' and '?'. [clarifyCalculation]
        ? "running" : "stopped");
        ^

Signed-off-by: Pierre-Louis Bossart &lt;pierre-louis.bossart@linux.intel.com&gt;
Link: https://lore.kernel.org/r/20200902212133.30964-6-pierre-louis.bossart@linux.intel.com
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
</feed>
