<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/sound/drivers/dummy.c, branch linux-4.3.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.3.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.3.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2016-02-19T22:28:32Z</updated>
<entry>
<title>ALSA: dummy: Implement timer backend switching more safely</title>
<updated>2016-02-19T22:28:32Z</updated>
<author>
<name>Takashi Iwai</name>
</author>
<published>2016-02-02T14:27:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6f2b0ab8f60ebe956fa6dea30ae2d52b0664faad'/>
<id>urn:sha1:6f2b0ab8f60ebe956fa6dea30ae2d52b0664faad</id>
<content type='text'>
commit ddce57a6f0a2d8d1bfacfa77f06043bc760403c2 upstream.

Currently the selected timer backend is referred at any moment from
the running PCM callbacks.  When the backend is switched, it's
possible to lead to inconsistency from the running backend.  This was
pointed by syzkaller fuzzer, and the commit [7ee96216c31a: ALSA:
dummy: Disable switching timer backend via sysfs] disabled the dynamic
switching for avoiding the crash.

This patch improves the handling of timer backend switching.  It keeps
the reference to the selected backend during the whole operation of an
opened stream so that it won't be changed by other streams.

Together with this change, the hrtimer parameter is reenabled as
writable now.

NOTE: this patch also turned out to fix the still remaining race.
Namely, ops was still replaced dynamically at dummy_pcm_open:

  static int dummy_pcm_open(struct snd_pcm_substream *substream)
  {
  ....
          dummy-&gt;timer_ops = &amp;dummy_systimer_ops;
          if (hrtimer)
                  dummy-&gt;timer_ops = &amp;dummy_hrtimer_ops;

Since dummy-&gt;timer_ops is common among all streams, and when the
replacement happens during accesses of other streams, it may lead to a
crash.  This was actually triggered by syzkaller fuzzer and KASAN.

This patch rewrites the code not to use the ops shared by all streams
any longer, too.

BugLink: http://lkml.kernel.org/r/CACT4Y+aZ+xisrpuM6cOXbL21DuM0yVxPYXf4cD4Md9uw0C3dBQ@mail.gmail.com
Reported-by: Dmitry Vyukov &lt;dvyukov@google.com&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>ALSA: dummy: Disable switching timer backend via sysfs</title>
<updated>2016-02-19T22:28:30Z</updated>
<author>
<name>Takashi Iwai</name>
</author>
<published>2016-01-28T06:54:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f6e8dd2e3e451e3aeb10bff4b80a1a9612e40838'/>
<id>urn:sha1:f6e8dd2e3e451e3aeb10bff4b80a1a9612e40838</id>
<content type='text'>
commit 7ee96216c31aabe1eb42fb91ff50dae9fcd014b2 upstream.

ALSA dummy driver can switch the timer backend between system timer
and hrtimer via its hrtimer module option.  This can be also switched
dynamically via sysfs, but it may lead to a memory corruption when
switching is done while a PCM stream is running; the stream instance
for the newly switched timer method tries to access the memory that
was allocated by another timer method although the sizes differ.

As the simplest fix, this patch just disables the switch via sysfs by
dropping the writable bit.

BugLink: http://lkml.kernel.org/r/CACT4Y+ZGEeEBntHW5WHn2GoeE0G_kRrCmUh6=dWyy-wfzvuJLg@mail.gmail.com
Reported-by: Dmitry Vyukov &lt;dvyukov@google.com&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>ALSA: dummy: Replace CONFIG_PROC_FS with CONFIG_SND_PROC_FS</title>
<updated>2015-05-29T05:47:50Z</updated>
<author>
<name>Takashi Iwai</name>
</author>
<published>2015-05-29T05:47:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=129a4c9f829d3e2113ce4f2c67cd431b48b2abb7'/>
<id>urn:sha1:129a4c9f829d3e2113ce4f2c67cd431b48b2abb7</id>
<content type='text'>
Although there shouldn't be a problem in practice (the compiler should
handle well), it's better to follow to the new Kconfig.

Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: dummy: make local data static</title>
<updated>2015-05-26T10:59:26Z</updated>
<author>
<name>Takashi Iwai</name>
</author>
<published>2015-05-26T10:51:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e4c286880e8f8f94f55b9abe26329ab106108230'/>
<id>urn:sha1:e4c286880e8f8f94f55b9abe26329ab106108230</id>
<content type='text'>
Add missing prefix to make some local data static.

Spotted by sparse:
  sound/drivers/dummy.c:159:20: warning: symbol 'model_emu10k1' was not declared. Should it be static?
  sound/drivers/dummy.c:165:20: warning: symbol 'model_rme9652' was not declared. Should it be static?
  ....

Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: dummy: use setup_timer and mod_timer</title>
<updated>2015-01-19T09:49:52Z</updated>
<author>
<name>Roman Kollar</name>
</author>
<published>2015-01-19T09:42:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2a52b6eef7386cc19dfc0a2e82a7e23d807e51e5'/>
<id>urn:sha1:2a52b6eef7386cc19dfc0a2e82a7e23d807e51e5</id>
<content type='text'>
Use setup_timer and mod_timer instead of structure assignments as it
is the preferred way to setup and set the timer.

Signed-off-by: Roman Kollar &lt;rkollar@mail.muni.cz&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: drivers: drop owner assignment from platform_drivers</title>
<updated>2014-10-20T14:21:59Z</updated>
<author>
<name>Wolfram Sang</name>
</author>
<published>2014-10-20T14:21:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5d5638afa0cb252442e1746a36550b46a9ebe6ee'/>
<id>urn:sha1:5d5638afa0cb252442e1746a36550b46a9ebe6ee</id>
<content type='text'>
A platform_driver does not need to set an owner, it will be populated by the
driver core.

Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
</content>
</entry>
<entry>
<title>ALSA: drivers: Convert to snd_card_new() with a device pointer</title>
<updated>2014-02-12T09:58:20Z</updated>
<author>
<name>Takashi Iwai</name>
</author>
<published>2014-01-29T11:59:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5872f3f621f9f65342583a85ec93b00c0a697eda'/>
<id>urn:sha1:5872f3f621f9f65342583a85ec93b00c0a697eda</id>
<content type='text'>
Also remove superfluous snd_card_set_dev() calls.

Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: replace strict_strto*() with kstrto*()</title>
<updated>2013-07-21T09:56:18Z</updated>
<author>
<name>Jingoo Han</name>
</author>
<published>2013-07-19T07:24:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b785a492c6eef578520594d5c4d6e9f2cb47cbeb'/>
<id>urn:sha1:b785a492c6eef578520594d5c4d6e9f2cb47cbeb</id>
<content type='text'>
The usage of strict_strto*() is not preferred, because
strict_strto*() is obsolete. Thus, kstrto*() should be
used.

Signed-off-by: Jingoo Han &lt;jg1.han@samsung.com&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: Remove the rest of *_set_drvdata(NULL) calls</title>
<updated>2013-05-29T10:50:59Z</updated>
<author>
<name>Takashi Iwai</name>
</author>
<published>2013-05-29T10:50:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f35e839a3ce730063174caaab8bf63432be553cf'/>
<id>urn:sha1:f35e839a3ce730063174caaab8bf63432be553cf</id>
<content type='text'>
A few calls are still left in parport drivers after this commit, which
I'm not quite sure yet.

Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: drivers: remove __dev* attributes</title>
<updated>2012-12-07T06:34:32Z</updated>
<author>
<name>Bill Pemberton</name>
</author>
<published>2012-12-06T17:35:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=fbbb01a12d5d553ea3851a020d98c0ac9b383673'/>
<id>urn:sha1:fbbb01a12d5d553ea3851a020d98c0ac9b383673</id>
<content type='text'>
CONFIG_HOTPLUG is going away as an option.  As result the __dev*
markings will be going away.

Remove use of __devinit, __devexit_p, __devinitdata, __devinitconst,
and __devexit.

Signed-off-by: Bill Pemberton &lt;wfp5p@virginia.edu&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
</feed>
