diff -urN linux-2.5.5/sound/core/info.c linux/sound/core/info.c --- linux-2.5.5/sound/core/info.c Tue Feb 19 21:11:01 2002 +++ linux/sound/core/info.c Tue Feb 19 21:50:18 2002 @@ -29,6 +29,7 @@ #include #include #include +#include #ifdef CONFIG_DEVFS_FS #include #endif @@ -162,31 +163,40 @@ { snd_info_private_data_t *data; struct snd_info_entry *entry; + int ret = -EINVAL; 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; + 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, diff -urN linux-2.5.5/Documentation/filesystems/porting linux/Documentation/filesystems/porting --- linux-2.5.5/Documentation/filesystems/porting Tue Feb 19 21:10:58 2002 +++ linux/Documentation/filesystems/porting Tue Feb 19 21:53:01 2002 @@ -81,11 +81,12 @@ [mandatory] ->lookup(), ->truncate(), ->create(), ->unlink(), ->mknod(), ->mkdir(), -->rmdir(), ->link(), ->symlink() and ->rename() are called without BKL now. -Grab it on the entry, drop upon return - that will guarantee the same -locking you used to have. If your method or its parts do not need BKL - -better yet, now you can shift lock_kernel() / unlock_kernel() so that -they would protect exactly what needs to be protected. +->rmdir(), ->link(), ->lseek(), ->symlink() and ->rename() are called +without BKL now. Grab it on the entry, drop upon return - that will +guarantee the same locking you used to have. If your method or its +parts do not need BKL - better yet, now you can shift lock_kernel() and +unlock_kernel() so that they would protect exactly what needs to be +protected. --- [informational]