summaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2022-02-09 09:19:12 +0100
committerTakashi Iwai <tiwai@suse.de>2022-02-09 09:20:11 +0100
commit69458e2c27800da7697c87ed908b65323ef3f3bd (patch)
treea9fc6a392c61295d7470abe58d0d894f399c674f /security
parent8f85b4da579e006547c8cf3660220c54b99451da (diff)
downloadlinux-69458e2c27800da7697c87ed908b65323ef3f3bd.tar.gz
linux-69458e2c27800da7697c87ed908b65323ef3f3bd.tar.bz2
linux-69458e2c27800da7697c87ed908b65323ef3f3bd.zip
ALSA: hda: Fix driver index handling at re-binding
HD-audio driver handles the multiple instances and keeps the static index that is incremented at each probe. This becomes a problem when user tries to re-bind the device via sysfs multiple times; as the device index isn't cleared unlike rmmod case, it points to the next element at re-binding, and eventually later you can't probe any more when it reaches to SNDRV_CARDS_MAX (usually 32). This patch is an attempt to improve the handling at rebinding. Instead of a static device index, now we keep a bitmap and assigns to the first zero bit position. At the driver remove, in return, the bitmap slot is cleared again, so that it'll be available for the next probe. Reported-by: Alexander Sergeyev <sergeev917@gmail.com> Link: https://lore.kernel.org/r/20220209081912.20687-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'security')
0 files changed, 0 insertions, 0 deletions