Skip to content

Commit 41aa5e5

Browse files
committed
Merge tag 'sound-4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound fixes from Takashi Iwai: "A few small last-minute fixes that should sneak into 4.15: - remove a spurious WARN_ON() triggered by syzkaller - fix for ioctl races in ALSA sequencer - two trivial HD-audio fixup entries" * tag 'sound-4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: seq: Make ioctls race-free ALSA: pcm: Remove yet superfluous WARN_ON() ALSA: hda - Apply the existing quirk to iMac 14,1 ALSA: hda - Apply headphone noise quirk for another Dell XPS 13 variant
2 parents 921d4f6 + b3defb7 commit 41aa5e5

File tree

5 files changed

+6
-1
lines changed

5 files changed

+6
-1
lines changed

sound/core/pcm_lib.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -560,7 +560,6 @@ static inline unsigned int muldiv32(unsigned int a, unsigned int b,
560560
{
561561
u_int64_t n = (u_int64_t) a * b;
562562
if (c == 0) {
563-
snd_BUG_ON(!n);
564563
*r = 0;
565564
return UINT_MAX;
566565
}

sound/core/seq/seq_clientmgr.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,7 @@ static struct snd_seq_client *seq_create_client1(int client_index, int poolsize)
221221
rwlock_init(&client->ports_lock);
222222
mutex_init(&client->ports_mutex);
223223
INIT_LIST_HEAD(&client->ports_list_head);
224+
mutex_init(&client->ioctl_mutex);
224225

225226
/* find free slot in the client table */
226227
spin_lock_irqsave(&clients_lock, flags);
@@ -2130,7 +2131,9 @@ static long snd_seq_ioctl(struct file *file, unsigned int cmd,
21302131
return -EFAULT;
21312132
}
21322133

2134+
mutex_lock(&client->ioctl_mutex);
21332135
err = handler->func(client, &buf);
2136+
mutex_unlock(&client->ioctl_mutex);
21342137
if (err >= 0) {
21352138
/* Some commands includes a bug in 'dir' field. */
21362139
if (handler->cmd == SNDRV_SEQ_IOCTL_SET_QUEUE_CLIENT ||

sound/core/seq/seq_clientmgr.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ struct snd_seq_client {
6161
struct list_head ports_list_head;
6262
rwlock_t ports_lock;
6363
struct mutex ports_mutex;
64+
struct mutex ioctl_mutex;
6465
int convert32; /* convert 32->64bit */
6566

6667
/* output pool */

sound/pci/hda/patch_cirrus.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -408,6 +408,7 @@ static const struct snd_pci_quirk cs420x_fixup_tbl[] = {
408408
/*SND_PCI_QUIRK(0x8086, 0x7270, "IMac 27 Inch", CS420X_IMAC27),*/
409409

410410
/* codec SSID */
411+
SND_PCI_QUIRK(0x106b, 0x0600, "iMac 14,1", CS420X_IMAC27_122),
411412
SND_PCI_QUIRK(0x106b, 0x1c00, "MacBookPro 8,1", CS420X_MBP81),
412413
SND_PCI_QUIRK(0x106b, 0x2000, "iMac 12,2", CS420X_IMAC27_122),
413414
SND_PCI_QUIRK(0x106b, 0x2800, "MacBookPro 10,1", CS420X_MBP101),

sound/pci/hda/patch_realtek.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6196,6 +6196,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
61966196
SND_PCI_QUIRK(0x1028, 0x075b, "Dell XPS 13 9360", ALC256_FIXUP_DELL_XPS_13_HEADPHONE_NOISE),
61976197
SND_PCI_QUIRK(0x1028, 0x075d, "Dell AIO", ALC298_FIXUP_SPK_VOLUME),
61986198
SND_PCI_QUIRK(0x1028, 0x0798, "Dell Inspiron 17 7000 Gaming", ALC256_FIXUP_DELL_INSPIRON_7559_SUBWOOFER),
6199+
SND_PCI_QUIRK(0x1028, 0x082a, "Dell XPS 13 9360", ALC256_FIXUP_DELL_XPS_13_HEADPHONE_NOISE),
61996200
SND_PCI_QUIRK(0x1028, 0x164a, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE),
62006201
SND_PCI_QUIRK(0x1028, 0x164b, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE),
62016202
SND_PCI_QUIRK(0x103c, 0x1586, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC2),

0 commit comments

Comments
 (0)