[patch 13/40] ALSA: hdsp - Fix zero division

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <linux-kernel@...>, <stable@...>
Cc: Justin Forbes <jmforbes@...>, Zwane Mwaikambo <zwane@...>, Theodore Ts'o <tytso@...>, Randy Dunlap <rdunlap@...>, Dave Jones <davej@...>, Chuck Wolber <chuckw@...>, Chris Wedgwood <reviews@...>, Michael Krufky <mkrufky@...>, Chuck Ebbert <cebbert@...>, Domenico Andreoli <cavokz@...>, <torvalds@...>, <akpm@...>, <alan@...>, Takashi Iwai <tiwai@...>, Jaroslav Kysela <perex@...>, Maarten Bressers <mbressers@...>, gentoo kernel <kernel@...>
Date: Thursday, November 15, 2007 - 2:44 am

-stable review patch.  If anyone has any objections, please let us know.

------------------
From: Takashi Iwai <tiwai@suse.de>

patch 2a3988f6d2c5be9d02463097775d1c66a8290527 in mainline.

Fix zero-division bug in the calculation dds offset.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Cc: Maarten Bressers <mbressers@gmail.com>
Cc: gentoo kernel <kernel@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 sound/pci/rme9652/hdsp.c |    3 +++
 1 file changed, 3 insertions(+)

--- a/sound/pci/rme9652/hdsp.c
+++ b/sound/pci/rme9652/hdsp.c
@@ -3108,6 +3108,9 @@ static int hdsp_dds_offset(struct hdsp *
 	unsigned int dds_value = hdsp->dds_value;
 	int system_sample_rate = hdsp->system_sample_rate;
 
+	if (!dds_value)
+		return 0;
+
 	n = DDS_NUMERATOR;
 	/*
 	 * dds_value = n / rate

-- 
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[patch 00/40] 2.6.23-stable review, driver (sans network) ch..., Greg Kroah-Hartman, (Thu Nov 15, 2:43 am)
[patch 40/40] ACPI: suspend: Wrong order of GPE restore., Greg Kroah-Hartman, (Thu Nov 15, 2:46 am)
[patch 39/40] ACPI: sleep: Fix GPE suspend cleanup, Greg Kroah-Hartman, (Thu Nov 15, 2:46 am)
[patch 38/40] libata: backport ATA_FLAG_NO_SRST and ATA_FLAG..., Greg Kroah-Hartman, (Thu Nov 15, 2:45 am)
[patch 37/40] libata: backport ATA_FLAG_NO_SRST and ATA_FLAG..., Greg Kroah-Hartman, (Thu Nov 15, 2:45 am)
[patch 35/40] radeon: set the address to access the GART tab..., Greg Kroah-Hartman, (Thu Nov 15, 2:45 am)
[patch 36/40] libata: add HTS542525K9SA00 to NCQ blacklist, Greg Kroah-Hartman, (Thu Nov 15, 2:45 am)
[patch 33/40] Char: rocket, fix dynamic_dev tty, Greg Kroah-Hartman, (Thu Nov 15, 2:45 am)
[patch 34/40] Char: moxa, fix and optimise empty timer, Greg Kroah-Hartman, (Thu Nov 15, 2:45 am)
[patch 31/40] ide: Fix cs5535 driver accessing beyond array ..., Greg Kroah-Hartman, (Thu Nov 15, 2:45 am)
[patch 30/40] ide: Fix siimage driver accessing beyond array..., Greg Kroah-Hartman, (Thu Nov 15, 2:45 am)
[patch 32/40] hptiop: avoid buffer overflow when returning s..., Greg Kroah-Hartman, (Thu Nov 15, 2:45 am)
[patch 29/40] ide: Add ide_get_paired_drive() helper, Greg Kroah-Hartman, (Thu Nov 15, 2:45 am)
[patch 27/40] i4l: fix random freezes with AVM B1 drivers, Greg Kroah-Hartman, (Thu Nov 15, 2:45 am)
[patch 28/40] ide: fix serverworks.c UDMA regression, Greg Kroah-Hartman, (Thu Nov 15, 2:45 am)
[patch 25/40] ALSA: hda-codec - Add array terminator for dmi..., Greg Kroah-Hartman, (Thu Nov 15, 2:45 am)
[patch 26/40] i4l: Fix random hard freeze with AVM c4 card, Greg Kroah-Hartman, (Thu Nov 15, 2:45 am)
[patch 24/40] USB: usbserial - fix potential deadlock betwee..., Greg Kroah-Hartman, (Thu Nov 15, 2:45 am)
[patch 20/40] USB: remove USB_QUIRK_NO_AUTOSUSPEND, Greg Kroah-Hartman, (Thu Nov 15, 2:44 am)
Re: [patch 20/40] USB: remove USB_QUIRK_NO_AUTOSUSPEND, Chuck Ebbert, (Thu Nov 15, 11:50 am)
[patch 22/40] USB: mutual exclusion for EHCI init and port r..., Greg Kroah-Hartman, (Thu Nov 15, 2:45 am)
[patch 23/40] USB: add URB_FREE_BUFFER to permissible flags, Greg Kroah-Hartman, (Thu Nov 15, 2:45 am)
[patch 21/40] usb-gadget-ether: prevent oops caused by error..., Greg Kroah-Hartman, (Thu Nov 15, 2:45 am)
[patch 19/40] MSI: Use correct data offset for 32-bit MSI in..., Greg Kroah-Hartman, (Thu Nov 15, 2:44 am)
[patch 18/40] md: raid5: fix clearing of biofill operations, Greg Kroah-Hartman, (Thu Nov 15, 2:44 am)
[patch 17/40] md: fix an unsigned compare to allow creation ..., Greg Kroah-Hartman, (Thu Nov 15, 2:44 am)
[patch 16/40] dm: fix thaw_bdev, Greg Kroah-Hartman, (Thu Nov 15, 2:44 am)
[patch 15/40] dm delay: fix status, Greg Kroah-Hartman, (Thu Nov 15, 2:44 am)
[patch 14/40] libata: sync NCQ blacklist with upstream, Greg Kroah-Hartman, (Thu Nov 15, 2:44 am)
[patch 13/40] ALSA: hdsp - Fix zero division, Greg Kroah-Hartman, (Thu Nov 15, 2:44 am)
[patch 12/40] ALSA: emu10k1 - Fix memory corruption, Greg Kroah-Hartman, (Thu Nov 15, 2:44 am)
[patch 11/40] ALSA: Fix build error without CONFIG_HAS_DMA, Greg Kroah-Hartman, (Thu Nov 15, 2:44 am)
[patch 10/40] ALSA: fix selector unit bug affecting some USB..., Greg Kroah-Hartman, (Thu Nov 15, 2:44 am)
[patch 09/40] ALSA: hda-codec - Avoid zero NID in line_out_p..., Greg Kroah-Hartman, (Thu Nov 15, 2:44 am)
[patch 08/40] IB/mthca: Use mmiowb() to avoid firmware comma..., Greg Kroah-Hartman, (Thu Nov 15, 2:44 am)
[patch 07/40] IB/uverbs: Fix checking of userspace object ow..., Greg Kroah-Hartman, (Thu Nov 15, 2:44 am)
[patch 06/40] hwmon/lm87: Disable VID when it should be, Greg Kroah-Hartman, (Thu Nov 15, 2:44 am)
[patch 05/40] hwmon/lm87: Fix a division by zero, Greg Kroah-Hartman, (Thu Nov 15, 2:44 am)
[patch 03/40] hwmon/w83627hf: Fix setting fan min right afte..., Greg Kroah-Hartman, (Thu Nov 15, 2:44 am)
[patch 04/40] hwmon/w83627hf: Dont assume bank 0, Greg Kroah-Hartman, (Thu Nov 15, 2:44 am)
[patch 02/40] i915: fix vbl swap allocation size., Greg Kroah-Hartman, (Thu Nov 15, 2:43 am)
[patch 01/40] POWERPC: Fix platinumfb framebuffer, Greg Kroah-Hartman, (Thu Nov 15, 2:43 am)