X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;ds=sidebyside;f=sound%2Fcore%2Fseq%2Foss%2Fseq_oss.c;h=27c5cac268aff8e1108ef88b14ec7e91f6268fb5;hb=c7b5ebbddf7bcd3651947760f423e3783bbe6573;hp=c03706069056ea76386b6a174c31648a6bc13242;hpb=5273a3df6485dc2ad6aa7ddd441b9a21970f003b;p=linux-2.6.git diff --git a/sound/core/seq/oss/seq_oss.c b/sound/core/seq/oss/seq_oss.c index c03706069..27c5cac26 100644 --- a/sound/core/seq/oss/seq_oss.c +++ b/sound/core/seq/oss/seq_oss.c @@ -22,6 +22,8 @@ #include #include +#include +#include #include #include #include @@ -34,13 +36,12 @@ MODULE_AUTHOR("Takashi Iwai "); MODULE_DESCRIPTION("OSS-compatible sequencer module"); MODULE_LICENSE("GPL"); -MODULE_CLASSES("{sound}"); /* Takashi says this is really only for sound-service-0-, but this is OK. */ MODULE_ALIAS_SNDRV_MINOR(SNDRV_MINOR_OSS_SEQUENCER); MODULE_ALIAS_SNDRV_MINOR(SNDRV_MINOR_OSS_MUSIC); #ifdef SNDRV_SEQ_OSS_DEBUG -MODULE_PARM(seq_oss_debug, "i"); +module_param(seq_oss_debug, int, 0644); MODULE_PARM_DESC(seq_oss_debug, "debug option"); int seq_oss_debug = 0; #endif @@ -56,8 +57,8 @@ static void unregister_proc(void); static int odev_open(struct inode *inode, struct file *file); static int odev_release(struct inode *inode, struct file *file); -static ssize_t odev_read(struct file *file, char *buf, size_t count, loff_t *offset); -static ssize_t odev_write(struct file *file, const char *buf, size_t count, loff_t *offset); +static ssize_t odev_read(struct file *file, char __user *buf, size_t count, loff_t *offset); +static ssize_t odev_write(struct file *file, const char __user *buf, size_t count, loff_t *offset); static int odev_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg); static unsigned int odev_poll(struct file *file, poll_table * wait); #ifdef CONFIG_PROC_FS @@ -154,7 +155,7 @@ odev_release(struct inode *inode, struct file *file) } static ssize_t -odev_read(struct file *file, char *buf, size_t count, loff_t *offset) +odev_read(struct file *file, char __user *buf, size_t count, loff_t *offset) { seq_oss_devinfo_t *dp; dp = file->private_data; @@ -164,7 +165,7 @@ odev_read(struct file *file, char *buf, size_t count, loff_t *offset) static ssize_t -odev_write(struct file *file, const char *buf, size_t count, loff_t *offset) +odev_write(struct file *file, const char __user *buf, size_t count, loff_t *offset) { seq_oss_devinfo_t *dp; dp = file->private_data; @@ -176,9 +177,14 @@ static int odev_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg) { seq_oss_devinfo_t *dp; + int err; dp = file->private_data; snd_assert(dp != NULL, return -EIO); - return snd_seq_oss_ioctl(dp, cmd, arg); + /* FIXME: need to unlock BKL to allow preemption */ + unlock_kernel(); + err = snd_seq_oss_ioctl(dp, cmd, arg); + lock_kernel(); + return err; }