<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="/rss.xsl.xml"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
    <title>Changes in control.c</title>
    <description></description>
    <language>en</language>
    <copyright>Copyright 2015</copyright>
    <generator>Java</generator><item>
        <title>a04dae6f - ALSA: silence integer wrapping warning</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/sound/core/control.c#a04dae6f</link>
        <description>ALSA: silence integer wrapping warningThis patch doesn&apos;t change runtime at all, it&apos;s just for kernel hardening.The &quot;count&quot; here comes from the user and on 32bit systems, it leads tointeger wrapping when we pass it to compute_user_elem_size():	alloc_size = compute_user_elem_size(private_size, count);However, the integer over is harmless because later &quot;count&quot; is checkedwhen we pass it to snd_ctl_new():	err = snd_ctl_new(&amp;kctl, count, access, file);These days as part of kernel hardening we&apos;re trying to avoid integeroverflows when they affect size_t type.  So to avoid the integer overflowcopy the check from snd_ctl_new() and do it at the start of thesnd_ctl_elem_add() function as well.Signed-off-by: Dan Carpenter &lt;dan.carpenter@linaro.org&gt;Reviewed-by: Jaroslav Kysela &lt;perex@perex.cz&gt;Link: https://patch.msgid.link/5457e8c1-01ff-4dd9-b49c-15b817f65ee7@stanley.mountainSigned-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;

            List of files:
            /linux-6.15/sound/core/control.c</description>
        <pubDate>Mon, 30 Sep 2024 07:19:58 +0000</pubDate>
        <dc:creator>Dan Carpenter &lt;dan.carpenter@linaro.org&gt;</dc:creator>
    </item>
<item>
        <title>cb787f4a - [tree-wide] finally take no_llseek out</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/sound/core/control.c#cb787f4a</link>
        <description>[tree-wide] finally take no_llseek outno_llseek had been defined to NULL two years ago, in commit 868941b14441(&quot;fs: remove no_llseek&quot;)To quote that commit,  At -rc1 we&apos;ll need do a mechanical removal of no_llseek -  git grep -l -w no_llseek | grep -v porting.rst | while read i; do	sed -i &apos;/\&lt;no_llseek\&gt;/d&apos; $i  done  would do it.Unfortunately, that hadn&apos;t been done.  Linus, could you do that now, sothat we could finally put that thing to rest? All instances are of theform	.llseek = no_llseek,so it&apos;s obviously safe.Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;

            List of files:
            /linux-6.15/sound/core/control.c</description>
        <pubDate>Fri, 27 Sep 2024 01:56:11 +0000</pubDate>
        <dc:creator>Al Viro &lt;viro@zeniv.linux.org.uk&gt;</dc:creator>
    </item>
<item>
        <title>40a024b8 - ALSA: core: Drop superfluous no_free_ptr() for memdup_user() errors</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/sound/core/control.c#40a024b8</link>
        <description>ALSA: core: Drop superfluous no_free_ptr() for memdup_user() errorsWe used to wrap with no_free_ptr() for the return value frommemdup_user() with errors where the auto cleanup is applied.  This wasa workaround because the initial implementation of kfree auto-cleanupchecked only NULL pointers.Since recently, though, the kfree auto-cleanup checks withIS_ERR_OR_NULL() (by the commit cd7eb8f83fcf (&quot;mm/slab: make__free(kfree) accept error pointers&quot;)), hence those workarounds becamesuperfluous.  Let&apos;s drop them now.Link: https://patch.msgid.link/20240902075246.3743-1-tiwai@suse.deSigned-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;

            List of files:
            /linux-6.15/sound/core/control.c</description>
        <pubDate>Mon, 02 Sep 2024 07:52:27 +0000</pubDate>
        <dc:creator>Takashi Iwai &lt;tiwai@suse.de&gt;</dc:creator>
    </item>
<item>
        <title>38ea4c3d - ALSA: control: Optimize locking for look-up</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/sound/core/control.c#38ea4c3d</link>
        <description>ALSA: control: Optimize locking for look-upFor a fast look-up of a control element via either numid or namematching (enabled via CONFIG_SND_CTL_FAST_LOOKUP), a locking isn&apos;tneeded at all thanks to Xarray.  OTOH, the locking is still needed fora slow linked-list traversal, and that&apos;s rather a rare case.In this patch, we reduce the use of locking at snd_ctl_find_*() APIfunctions, and switch from controls_rwsem to controls_rwlock foravoiding unnecessary lock inversions.  This also resulted in a nicecleanup, as *_unlocked() version of snd_ctl_find_*() APIs can bedropped.snd_ctl_find_id_mixer_unlocked() is still left just as an alias ofsnd_ctl_find_id_mixer(), since soc-card.c has a wrapper and there areseveral users.  Once after converting there, we can remove it later.Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;Link: https://patch.msgid.link/20240809104234.8488-3-tiwai@suse.de

            List of files:
            /linux-6.15/sound/core/control.c</description>
        <pubDate>Fri, 09 Aug 2024 10:42:30 +0000</pubDate>
        <dc:creator>Takashi Iwai &lt;tiwai@suse.de&gt;</dc:creator>
    </item>
<item>
        <title>f428cc9e - ALSA: control: Rename ctl_files_rwlock to controls_rwlock</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/sound/core/control.c#f428cc9e</link>
        <description>ALSA: control: Rename ctl_files_rwlock to controls_rwlockWe&apos;ll re-use the existing rwlock for the protection of control listlookup, too, and now rename it to a more generic name.This is a preliminary change, only the rename of the struct fieldhere, no functional changes.Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;Link: https://patch.msgid.link/20240809104234.8488-2-tiwai@suse.de

            List of files:
            /linux-6.15/sound/core/control.c</description>
        <pubDate>Fri, 09 Aug 2024 10:42:29 +0000</pubDate>
        <dc:creator>Takashi Iwai &lt;tiwai@suse.de&gt;</dc:creator>
    </item>
<item>
        <title>fef1ac95 - ALSA: control: Fix leftover snd_power_unref()</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/sound/core/control.c#fef1ac95</link>
        <description>ALSA: control: Fix leftover snd_power_unref()One snd_power_unref() was forgotten and left at __snd_ctl_elem_info()in the previous change for reorganizing the locking order.Fixes: fcc62b19104a (&quot;ALSA: control: Take power_ref lock primarily&quot;)Link: https://github.com/thesofproject/linux/pull/5127Link: https://patch.msgid.link/20240801064203.30284-1-tiwai@suse.deSigned-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;

            List of files:
            /linux-6.15/sound/core/control.c</description>
        <pubDate>Thu, 01 Aug 2024 06:42:01 +0000</pubDate>
        <dc:creator>Takashi Iwai &lt;tiwai@suse.de&gt;</dc:creator>
    </item>
<item>
        <title>fcc62b19 - ALSA: control: Take power_ref lock primarily</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/sound/core/control.c#fcc62b19</link>
        <description>ALSA: control: Take power_ref lock primarilyThe code path for kcontrol accesses have often nested locks of bothcard&apos;s controls_rwsem and power_ref, and applies in that order.However, what could take much longer is the latter, power_ref; itwaits for the power state of the device, and it pretty much depends onthe user&apos;s action.This patch swaps the locking order of those locks to a more naturalway, namely, power_ref -&gt; controls_rwsem, in order to shorten the timeof possible nested locks.  For consistency, power_ref is taken alwaysin the top-level caller side (that is, *_user() functions and theioctl handler itself).Link: https://patch.msgid.link/20240729160659.4516-1-tiwai@suse.deSigned-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;

            List of files:
            /linux-6.15/sound/core/control.c</description>
        <pubDate>Mon, 29 Jul 2024 16:06:58 +0000</pubDate>
        <dc:creator>Takashi Iwai &lt;tiwai@suse.de&gt;</dc:creator>
    </item>
<item>
        <title>4e965200 - ALSA: control: Annotate snd_kcontrol with __counted_by()</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/sound/core/control.c#4e965200</link>
        <description>ALSA: control: Annotate snd_kcontrol with __counted_by()struct snd_kcontrol contains a flex array of snd_kcontrol_volatileobjects at its end, and the array size is stored in count field.This can be annotated gracefully with __counted_by() for catchingpossible array overflows.One additional change is the order of the count field initialization;The assignment of the count field is moved before assignment of vd[]elements for avoiding false-positive warnings from compilers.Link: https://patch.msgid.link/20240726152840.8629-1-tiwai@suse.deSigned-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;

            List of files:
            /linux-6.15/sound/core/control.c</description>
        <pubDate>Fri, 26 Jul 2024 15:28:15 +0000</pubDate>
        <dc:creator>Takashi Iwai &lt;tiwai@suse.de&gt;</dc:creator>
    </item>
<item>
        <title>e946455c - ALSA: control: Allow NULL passed to snd_ctl_remove()</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/sound/core/control.c#e946455c</link>
        <description>ALSA: control: Allow NULL passed to snd_ctl_remove()There are lots of code checking NULL for kcontrol passed tosnd_ctl_remove() in the caller side.  Let&apos;s make snd_ctl_remove()accepting the NULL kcontrol instead a la free(), so that we can cleanup the caller side.Link: https://lore.kernel.org/20240617100529.6667-2-tiwai@suse.deSigned-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;

            List of files:
            /linux-6.15/sound/core/control.c</description>
        <pubDate>Mon, 17 Jun 2024 10:05:23 +0000</pubDate>
        <dc:creator>Takashi Iwai &lt;tiwai@suse.de&gt;</dc:creator>
    </item>
<item>
        <title>50ed0812 - ALSA: control: Apply sanity check of input values for user elements</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/sound/core/control.c#50ed0812</link>
        <description>ALSA: control: Apply sanity check of input values for user elementsAlthough we have already a mechanism for sanity checks of input valuesfor control writes, it&apos;s not applied unless the kconfigCONFIG_SND_CTL_INPUT_VALIDATION is set due to the performance reason.Nevertheless, it still makes sense to apply the same check for userelements despite of its cost, as that&apos;s the only way to filter out theinvalid values; the user controls are handled solely in ALSA corecode, and there is no corresponding driver, after all.This patch adds the same input value validation for user controlelements at its put callback.  The kselftest will be happier with thischange, as the incorrect values will be bailed out now with errors.For other normal controls, the check is applied still only whenCONFIG_SND_CTL_INPUT_VALIDATION is set.Reported-by: Paul Menzel &lt;pmenzel@molgen.mpg.de&gt;Closes: https://lore.kernel.org/r/1d44be36-9bb9-4d82-8953-5ae2a4f09405@molgen.mpg.deReviewed-by: Jaroslav Kysela &lt;perex@perex.cz&gt;Reviewed-by: Mark Brown &lt;broonie@kernel.org&gt;Reviewed-by: Takashi Sakamoto &lt;o-takashi@sakamocchi.jp&gt;Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;Link: https://lore.kernel.org/20240616073454.16512-4-tiwai@suse.de

            List of files:
            /linux-6.15/sound/core/control.c</description>
        <pubDate>Sun, 16 Jun 2024 07:34:44 +0000</pubDate>
        <dc:creator>Takashi Iwai &lt;tiwai@suse.de&gt;</dc:creator>
    </item>
<item>
        <title>14d81146 - ALSA: control: Fix unannotated kfree() cleanup</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/sound/core/control.c#14d81146</link>
        <description>ALSA: control: Fix unannotated kfree() cleanupThe recent conversion to the automatic kfree() forgot to mark avariable with __free(kfree), leading to memory leaks.  Fix it.Fixes: 1052d9882269 (&quot;ALSA: control: Use automatic cleanup of kfree()&quot;)Reported-by: Mirsad Todorovac &lt;mirsad.todorovac@alu.unizg.hr&gt;Closes: https://lore.kernel.org/r/c1e2ef3c-164f-4840-9b1c-f7ca07ca422a@alu.unizg.hrMessage-ID: &lt;20240320062722.31325-1-tiwai@suse.de&gt;Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;

            List of files:
            /linux-6.15/sound/core/control.c</description>
        <pubDate>Wed, 20 Mar 2024 06:27:20 +0000</pubDate>
        <dc:creator>Takashi Iwai &lt;tiwai@suse.de&gt;</dc:creator>
    </item>
<item>
        <title>471be437 - ALSA: control: Use guard() for locking</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/sound/core/control.c#471be437</link>
        <description>ALSA: control: Use guard() for lockingWe can simplify the code gracefully with new guard() macro and co forautomatic cleanup of locks.The lops calls under multiple rwsems are factored out as a simplemacro, so that it can be called easily from snd_ctl_dev_register()and snd_ctl_dev_disconnect().There are a few remaining explicit rwsem and spinlock calls, and thoseare the places where the lock downgrade happens or where the temporaryunlock/relocking happens -- which guard() doens&apos;t cover well yet.Only the code refactoring, and no functional changes.Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;Link: https://lore.kernel.org/r/20240227085306.9764-9-tiwai@suse.de

            List of files:
            /linux-6.15/sound/core/control.c</description>
        <pubDate>Tue, 27 Feb 2024 08:52:50 +0000</pubDate>
        <dc:creator>Takashi Iwai &lt;tiwai@suse.de&gt;</dc:creator>
    </item>
<item>
        <title>1052d988 - ALSA: control: Use automatic cleanup of kfree()</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/sound/core/control.c#1052d988</link>
        <description>ALSA: control: Use automatic cleanup of kfree()There are common patterns where a temporary buffer is allocated andfreed at the exit, and those can be simplified with the recent cleanupmechanism via __free(kfree).A caveat is that some allocations are memdup_user() and they return anerror pointer instead of NULL.  Those need special cares and the valuehas to be cleared with no_free_ptr() at the allocation error path.Other than that, the conversions are straightforward.No functional changes, only code refactoring.Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;Link: https://lore.kernel.org/r/20240222111509.28390-3-tiwai@suse.de

            List of files:
            /linux-6.15/sound/core/control.c</description>
        <pubDate>Thu, 22 Feb 2024 11:15:02 +0000</pubDate>
        <dc:creator>Takashi Iwai &lt;tiwai@suse.de&gt;</dc:creator>
    </item>
<item>
        <title>6a66b01d - ALSA: control: Don&apos;t embed ctl_dev</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/sound/core/control.c#6a66b01d</link>
        <description>ALSA: control: Don&apos;t embed ctl_devEmbedding the ctl_dev in the snd_card object may result in UAF whenthe delayed kobj release is used; at the delayed kobj release, itstill accesses the struct device itself while the card memory (thatembeds the struct device) may be already gone.As a workaround, detach the struct device from the card object byallocating via the new snd_device_alloc() helper.  The rest are justreplacing ctl_dev access to the pointer.This is based on the fix Curtis posted initially.  In this patch, thechanges are split and use the new helper function instead.Link: https://lore.kernel.org/r/20230801171928.1460120-1-cujomalainey@chromium.orgReviewed-by: Jaroslav Kysela &lt;perex@perex.cz&gt;Signed-off-by: Curtis Malainey &lt;cujomalainey@chromium.org&gt;Tested-by: Curtis Malainey &lt;cujomalainey@chromium.org&gt;Link: https://lore.kernel.org/r/20230816160252.23396-3-tiwai@suse.deSigned-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;

            List of files:
            /linux-6.15/sound/core/control.c</description>
        <pubDate>Wed, 16 Aug 2023 16:02:45 +0000</pubDate>
        <dc:creator>Takashi Iwai &lt;tiwai@suse.de&gt;</dc:creator>
    </item>
<item>
        <title>9c2cc565 - ALSA: control: Take lock in snd_ctl_find_id() and snd_ctl_find_numid()</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/sound/core/control.c#9c2cc565</link>
        <description>ALSA: control: Take lock in snd_ctl_find_id() and snd_ctl_find_numid()Now all needed callers have been replaced with *_locked() versions,let&apos;s turn on the locking in snd_ctl_find_id() andsnd_ctl_find_numid().This patch also adds the lockdep assertions for debugging, too.Link: https://lore.kernel.org/r/20230718141304.1032-11-tiwai@suse.deSigned-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;

            List of files:
            /linux-6.15/sound/core/control.c</description>
        <pubDate>Tue, 18 Jul 2023 14:13:03 +0000</pubDate>
        <dc:creator>Takashi Iwai &lt;tiwai@suse.de&gt;</dc:creator>
    </item>
<item>
        <title>b1e055f6 - ALSA: control: Introduce unlocked version for snd_ctl_find_*() helpers</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/sound/core/control.c#b1e055f6</link>
        <description>ALSA: control: Introduce unlocked version for snd_ctl_find_*() helpersFor reducing the unnecessary use of controls_rwsem in the drivers,this patch adds a new variant for snd_ctl_find_*() helpers:snd_ctl_find_id_locked() and snd_ctl_find_numid_locked() look for akctl element inside the card-&gt;controls_rwsem -- that is, doing thevery same as what snd_ctl_find_id() and snd_ctl_find_numid() did untilnow.  snd_ctl_find_id() and snd_ctl_find_numid() remain same,i.e. still unlocked version, but they will be switched to lockedversion once after all callers are replaced.The patch also replaces the calls of snd_ctl_find_id() andsnd_ctl_find_numid() in a few places; all of those are places where weknow that the functions are called properly with controls_rwsem held.All others are without rwsem (although they should have been).After this patch, we&apos;ll turn on the locking in snd_ctl_find_id() andsnd_ctl_find_numid() to be more race-free.Link: https://lore.kernel.org/r/20230718141304.1032-10-tiwai@suse.deSigned-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;

            List of files:
            /linux-6.15/sound/core/control.c</description>
        <pubDate>Tue, 18 Jul 2023 14:13:02 +0000</pubDate>
        <dc:creator>Takashi Iwai &lt;tiwai@suse.de&gt;</dc:creator>
    </item>
<item>
        <title>6723670a - ALSA: control: Make snd_ctl_find_id() argument const</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/sound/core/control.c#6723670a</link>
        <description>ALSA: control: Make snd_ctl_find_id() argument constThe id object passed to snd_ctl_find_id() is only read, and we canmark it with const gracefully.Link: https://lore.kernel.org/r/20230718141304.1032-9-tiwai@suse.deSigned-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;

            List of files:
            /linux-6.15/sound/core/control.c</description>
        <pubDate>Tue, 18 Jul 2023 14:13:01 +0000</pubDate>
        <dc:creator>Takashi Iwai &lt;tiwai@suse.de&gt;</dc:creator>
    </item>
<item>
        <title>8320ba0c - ALSA: control: Add lockdep warning to internal functions</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/sound/core/control.c#8320ba0c</link>
        <description>ALSA: control: Add lockdep warning to internal functionsTo assure the proper locking, add the lockdep check to__snd_ctl_remove(), __snd_ctl_add_replace() and other internalfunctions to handle user controls.Link: https://lore.kernel.org/r/20230718141304.1032-6-tiwai@suse.deSigned-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;

            List of files:
            /linux-6.15/sound/core/control.c</description>
        <pubDate>Tue, 18 Jul 2023 14:12:58 +0000</pubDate>
        <dc:creator>Takashi Iwai &lt;tiwai@suse.de&gt;</dc:creator>
    </item>
<item>
        <title>192c4ccc - ALSA: control: Take controls_rwsem lock in snd_ctl_remove()</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/sound/core/control.c#192c4ccc</link>
        <description>ALSA: control: Take controls_rwsem lock in snd_ctl_remove()So far, snd_ctl_remove() requires its caller to takecard-&gt;controls_rwsem manually before the call for avoiding possibleraces.  However, many callers don&apos;t care and miss the locking.Basically it&apos;s cumbersome and error-prone to enforce it to eachcaller.  Moreover, card-&gt;controls_rwsem is a field that should be usedonly by internal or proper helpers, and it&apos;s not to be touched atrandom external places.This patch is an attempt to make those calls more consistent: nowsnd_ctl_remove() takes the card-&gt;controls_rwsem internally, just likeother API functions for kctls.  Since a few callers already take thecontrols_rwsem locks, the patch removes those locks at the same time,too.Link: https://lore.kernel.org/r/20230718141304.1032-5-tiwai@suse.deSigned-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;

            List of files:
            /linux-6.15/sound/core/control.c</description>
        <pubDate>Tue, 18 Jul 2023 14:12:57 +0000</pubDate>
        <dc:creator>Takashi Iwai &lt;tiwai@suse.de&gt;</dc:creator>
    </item>
<item>
        <title>d4e99962 - ALSA: control: Take card-&gt;controls_rwsem in snd_ctl_rename()</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/sound/core/control.c#d4e99962</link>
        <description>ALSA: control: Take card-&gt;controls_rwsem in snd_ctl_rename()snd_ctl_rename() expects that card-&gt;controls_rwsem is held in thecaller side for avoiding possible races, but actually no one reallydid that.  It&apos;s likely because this operation is done usually only atthe device initialization where no race can happen.  But, it&apos;s stillsafer to take a lock, so we just take the lock inside snd_ctl_rename()like most of other API functions do.Link: https://lore.kernel.org/r/20230718141304.1032-2-tiwai@suse.deSigned-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;

            List of files:
            /linux-6.15/sound/core/control.c</description>
        <pubDate>Tue, 18 Jul 2023 14:12:54 +0000</pubDate>
        <dc:creator>Takashi Iwai &lt;tiwai@suse.de&gt;</dc:creator>
    </item>
</channel>
</rss>
