All of lore.kernel.org
 help / color / mirror / Atom feed
* 2.4.14-pre7+ fs/proc/inode.c breaks chardevs in /proc
@ 2001-11-27  0:53 Jochen Eisinger
  2001-11-27  8:13 ` Patch for 2.4.15-pre7+ (was 2.4.14-pre7+ fs/proc/inode.c...) Jochen Eisinger
  0 siblings, 1 reply; 2+ messages in thread
From: Jochen Eisinger @ 2001-11-27  0:53 UTC (permalink / raw)
  To: linux-kernel

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi!

Since 2.4.15-pre7 char-major devices located in the proc fs report
major/minor 0 instead of the correct values.

I figured out this is due to an incorrect patch in fs/proc/inode.c which
allows inode and/or file operations to be set for character device. The
problem occured with alsa which provides in /proc/asound/dev/ character
devices for accessing the sound cards. Since -pre7 these where all
char major/minor 0, although the sound driver still worked through the
oss/lite interface.

reverting the function proc_get_inode to -pre6 solves this problem:

- --- ./fs/proc/inode.c   Tue Nov 27 00:21:06 2001
+++ ./fs/proc/inode.c-pre6      Sun Sep 30 21:26:08 2001
@@ -160,12 +160,14 @@
                        inode->i_nlink = de->nlink;
                if (de->owner)
                        __MOD_INC_USE_COUNT(de->owner);
- -               if (de->proc_iops)
- -                       inode->i_op = de->proc_iops;
- -               if (de->proc_fops)
- -                       inode->i_fop = de->proc_fops;
- -               else if (S_ISBLK(de->mode)||S_ISCHR(de->mode)||S_ISFIFO(de->mode))
+               if (S_ISBLK(de->mode)||S_ISCHR(de->mode)||S_ISFIFO(de->mode))
                        init_special_inode(inode,de->mode,kdev_t_to_nr(de->rdev));
+               else {
+                       if (de->proc_iops)
+                               inode->i_op = de->proc_iops;
+                       if (de->proc_fops)
+                               inode->i_fop = de->proc_fops;
+               }
        }

 out:

regards
- -- jochen

- -- 
  "I'd rather die before using Micro$oft Word"
    -- Donald E. Knuth
     (asked whether he'd reinvent TeX in the light of M$ Word)

  GnuGP public key for jochen.eisinger@gmx.de:
      http://home.nexgo.de/jochen.eisinger/pubkey.asc (0x8AEB7AE3)


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: Weitere Infos: siehe http://www.gnupg.org

iD8DBQE8AuQr8OF76YrreuMRAv5MAJwKvauDrXe5LCgAW5uEvoI0jCO6rgCfZnln
GrVAbUMTjo72mv8Bqj6dDNU=
=RevS
-----END PGP SIGNATURE-----


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-11-27  8:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-11-27  0:53 2.4.14-pre7+ fs/proc/inode.c breaks chardevs in /proc Jochen Eisinger
2001-11-27  8:13 ` Patch for 2.4.15-pre7+ (was 2.4.14-pre7+ fs/proc/inode.c...) Jochen Eisinger

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.