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-next>] [day] [month] [year] [list]
Date:	Sat, 05 Mar 2011 01:07:52 -0500
From:	Nicholas Niro <nik_89@...roponic.com>
To:	linux-kernel@...r.kernel.org
Cc:	Takashi Iwai <tiwai@...e.de>
Subject: [PATCH] sound: Added missing conditionnal for OSS function prototypes

As per the source file sound/sound_core.c, the function prototypes
register_sound_special, register_sound_special_device et al, are
all prototypes that are only compiled when the flag
CONFIG_SOUND_OSS_CORE is set. But regardless of if
it is set, those prototypes are still all
available in linux/sound.h.

This bug was found when trying to compile standalone alsa.
In order to check for the function register_sound_special_device
availability, it looks for it's prototype in linux/sound.h and of course
it finds it because of the bug (even if it's not, actually, compiled in),
creating unknown symbol errors when loading snd.ko et al.

Signed-off-by: Nicholas Niro <nik_89@...roponic.com>
Cc: Takashi Iwai <tiwai@...e.de>
---
 include/linux/sound.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/include/linux/sound.h b/include/linux/sound.h
index 44dcf05..7e49712 100644
--- a/include/linux/sound.h
+++ b/include/linux/sound.h
@@ -30,6 +30,7 @@
  *	Sound core interface functions
  */
  
+#ifdef CONFIG_SOUND_OSS_CORE
 struct device;
 extern int register_sound_special(const struct file_operations *fops, int unit);
 extern int register_sound_special_device(const struct file_operations *fops, int unit, struct device *dev);
@@ -41,4 +42,5 @@ extern void unregister_sound_special(int unit);
 extern void unregister_sound_mixer(int unit);
 extern void unregister_sound_midi(int unit);
 extern void unregister_sound_dsp(int unit);
+#endif /* CONFIG_SOUND_OSS_CORE */
 #endif /* __KERNEL__ */
-- 
1.7.4.1.107.g394f

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ