lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 11 Jul 2013 17:06:04 +0800
From:	Ming Lei <ming.lei@...onical.com>
To:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:	linux-usb@...r.kernel.org, Oliver Neukum <oliver@...kum.org>,
	Alan Stern <stern@...land.harvard.edu>,
	linux-input@...r.kernel.org, linux-bluetooth@...r.kernel.org,
	netdev@...r.kernel.org, linux-wireless@...r.kernel.org,
	linux-media@...r.kernel.org, alsa-devel@...a-project.org,
	Ming Lei <ming.lei@...onical.com>,
	Mauro Carvalho Chehab <mchehab@...hat.com>
Subject: [PATCH 41/50] media: usb: em28xx: make sure irq disabled before acquiring lock

Complete() will be run with interrupt enabled, so add local_irq_save()
before acquiring the lock without irqsave().

Cc: Mauro Carvalho Chehab <mchehab@...hat.com>
Cc: linux-media@...r.kernel.org
Signed-off-by: Ming Lei <ming.lei@...onical.com>
---
 drivers/media/usb/em28xx/em28xx-audio.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/media/usb/em28xx/em28xx-audio.c b/drivers/media/usb/em28xx/em28xx-audio.c
index 2fdb66e..dca53ec 100644
--- a/drivers/media/usb/em28xx/em28xx-audio.c
+++ b/drivers/media/usb/em28xx/em28xx-audio.c
@@ -113,6 +113,7 @@ static void em28xx_audio_isocirq(struct urb *urb)
 		stride = runtime->frame_bits >> 3;
 
 		for (i = 0; i < urb->number_of_packets; i++) {
+			unsigned long flags;
 			int length =
 			    urb->iso_frame_desc[i].actual_length / stride;
 			cp = (unsigned char *)urb->transfer_buffer +
@@ -134,6 +135,7 @@ static void em28xx_audio_isocirq(struct urb *urb)
 				       length * stride);
 			}
 
+			local_irq_save(flags);
 			snd_pcm_stream_lock(substream);
 
 			dev->adev.hwptr_done_capture += length;
@@ -151,6 +153,7 @@ static void em28xx_audio_isocirq(struct urb *urb)
 			}
 
 			snd_pcm_stream_unlock(substream);
+			local_irq_restore(flags);
 		}
 		if (period_elapsed)
 			snd_pcm_period_elapsed(substream);
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ