On Fri, 15 Feb 2002, Jos Hulzink wrote:

> Hi,
>
> Still fighting with the debug tools (I'm new to kernel debugging), but
> maybe this info is useful to others:
>
> 2.5.5-pre1 deadlocked completely about 7 times in 40 minutes. The Magic
> SysRq key didn't work anymore. Don't know if it is related, but after I
> recompiled the ALSA driver as modules, the system was stable for about 4
> hours. (With ALSA modules loaded, playing music, and I rebooted it myself
> afterwards.)
>
> Besides: the ALSA /proc interface is terribly broken, any cat
> /proc/asound/... results in a no such device error. The ALSA /dev entries
> return the same errors while opening them, but the OSS emulation layer
> works fine.

Attached patch for linux/sound/core/info.c fixes the problem with /proc
entries.

                                                Jaroslav

-----
Jaroslav Kysela <[EMAIL PROTECTED]>
Linux Kernel Sound Maintainer
ALSA Project  http://www.alsa-project.org
SuSE Linux    http://www.suse.com
Index: info.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/core/info.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- info.c      14 Feb 2002 17:40:30 -0000      1.7
+++ info.c      15 Feb 2002 12:10:26 -0000      1.8
@@ -278,7 +278,7 @@
        int mode, err;
 
        down(&info_mutex);
-       p = (struct proc_dir_entry *) inode->u.generic_ip;
+       p = PDE(inode);
        entry = p == NULL ? NULL : (snd_info_entry_t *)p->data;
        if (entry == NULL) {
                up(&info_mutex);
@@ -541,7 +541,7 @@
 static int snd_info_card_readlink(struct dentry *dentry,
                                  char *buffer, int buflen)
 {
-        char *s = ((struct proc_dir_entry *) dentry->d_inode->u.generic_ip)->data;
+        char *s = PDE(dentry->d_inode)->data;
 #ifndef LINUX_2_2
        return vfs_readlink(dentry, buffer, buflen, s);
 #else
@@ -562,7 +562,7 @@
 static int snd_info_card_followlink(struct dentry *dentry,
                                    struct nameidata *nd)
 {
-        char *s = ((struct proc_dir_entry *) dentry->d_inode->u.generic_ip)->data;
+        char *s = PDE(dentry->d_inode)->data;
         return vfs_follow_link(nd, s);
 }
 #else
@@ -570,7 +570,7 @@
                                               struct dentry *base,
                                               unsigned int follow)
 {
-       char *s = ((struct proc_dir_entry *) dentry->d_inode->u.generic_ip)->data;
+       char *s = PDE(dentry->d_inode)->data;
        return lookup_dentry(s, base, follow);
 }
 #endif
@@ -845,7 +845,7 @@
                return;
        }
        MOD_INC_USE_COUNT;
-       de = (struct proc_dir_entry *) inode->u.generic_ip;
+       de = PDE(inode);
        if (de == NULL)
                return;
        entry = (snd_info_entry_t *) de->data;

Reply via email to