On Mon, 2002-02-18 at 15:12, Jaroslav Kysela wrote: > Sorry to reply too late, but I've not received this email before. It seems > that LKML has some trouble. Only the part of patch for sound/core/info.c > is valid, because llseek in gus_mem_proc.c is called from snd_info_entry_llseek(), > thus the function is already protected.
Ah, the lseek in sound/isa/gus/gus_mem_proc.c :: snd_gf1_mem_proc_llseek is _only_ called from info.c's lseek? Then, indeed, we can remove it. Attached patch below only adds the BKL to info.c's lseek. Thanks, Robert Love --- linux-2.5.5-pre1/sound/core/info.c Wed Feb 13 18:18:59 2002 +++ linux/sound/core/info.c Sat Feb 16 18:17:39 2002 @@ -160,31 +160,41 @@ { snd_info_private_data_t *data; struct snd_info_entry *entry; + int ret; data = snd_magic_cast(snd_info_private_data_t, file->private_data, return -ENXIO); entry = data->entry; + lock_kernel(); switch (entry->content) { case SNDRV_INFO_CONTENT_TEXT: switch (orig) { case 0: /* SEEK_SET */ file->f_pos = offset; - return file->f_pos; + ret = file->f_pos; + goto out; case 1: /* SEEK_CUR */ file->f_pos += offset; - return file->f_pos; + ret = file->f_pos; + goto out; case 2: /* SEEK_END */ default: - return -EINVAL; + ret = -EINVAL; + goto out; } break; case SNDRV_INFO_CONTENT_DATA: - if (entry->c.ops->llseek) - return entry->c.ops->llseek(entry, + if (entry->c.ops->llseek) { + ret = entry->c.ops->llseek(entry, data->file_private_data, file, offset, orig); + goto out; + } break; } - return -ENXIO; + ret = -ENXIO; +out: + unlock_kernel(); + return ret; } static ssize_t snd_info_entry_read(struct file *file, char *buffer, _______________________________________________ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel