Commit 630db0e3 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'sound-3.12' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
 "All reasonably small fixes as rc6: a HD-audio mic fix, a us122l mmap
  regression fix, and kernel memory leak fix in hdsp driver.  Hopefully
  this will be the last pull request for 3.12..."

* tag 'sound-3.12' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: hdsp - info leak in snd_hdsp_hwdep_ioctl()
  ALSA: us122l: Fix pcm_usb_stream mmapping regression
  ALSA: hda - Fix inverted internal mic not indicated on some machines
parents b2118ea9 d14df339
...@@ -3531,7 +3531,7 @@ static int create_capture_mixers(struct hda_codec *codec) ...@@ -3531,7 +3531,7 @@ static int create_capture_mixers(struct hda_codec *codec)
if (!multi) if (!multi)
err = create_single_cap_vol_ctl(codec, n, vol, sw, err = create_single_cap_vol_ctl(codec, n, vol, sw,
inv_dmic); inv_dmic);
else if (!multi_cap_vol) else if (!multi_cap_vol && !inv_dmic)
err = create_bind_cap_vol_ctl(codec, n, vol, sw); err = create_bind_cap_vol_ctl(codec, n, vol, sw);
else else
err = create_multi_cap_vol_ctl(codec); err = create_multi_cap_vol_ctl(codec);
......
...@@ -4845,6 +4845,7 @@ static int snd_hdsp_hwdep_ioctl(struct snd_hwdep *hw, struct file *file, unsigne ...@@ -4845,6 +4845,7 @@ static int snd_hdsp_hwdep_ioctl(struct snd_hwdep *hw, struct file *file, unsigne
if ((err = hdsp_get_iobox_version(hdsp)) < 0) if ((err = hdsp_get_iobox_version(hdsp)) < 0)
return err; return err;
} }
memset(&hdsp_version, 0, sizeof(hdsp_version));
hdsp_version.io_type = hdsp->io_type; hdsp_version.io_type = hdsp->io_type;
hdsp_version.firmware_rev = hdsp->firmware_rev; hdsp_version.firmware_rev = hdsp->firmware_rev;
if ((err = copy_to_user(argp, &hdsp_version, sizeof(hdsp_version)))) if ((err = copy_to_user(argp, &hdsp_version, sizeof(hdsp_version))))
......
...@@ -262,7 +262,9 @@ static int usb_stream_hwdep_mmap(struct snd_hwdep *hw, ...@@ -262,7 +262,9 @@ static int usb_stream_hwdep_mmap(struct snd_hwdep *hw,
} }
area->vm_ops = &usb_stream_hwdep_vm_ops; area->vm_ops = &usb_stream_hwdep_vm_ops;
area->vm_flags |= VM_DONTEXPAND | VM_DONTDUMP; area->vm_flags |= VM_DONTDUMP;
if (!read)
area->vm_flags |= VM_DONTEXPAND;
area->vm_private_data = us122l; area->vm_private_data = us122l;
atomic_inc(&us122l->mmap_count); atomic_inc(&us122l->mmap_count);
out: out:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment