Re: 2.5.70 freeze unloading module "snd"

From: Paolo Ornati (
Date: Fri Jun 13 2003 - 04:42:22 EST

On Thursday 12 June 2003 18:32, Paolo Ornati wrote:
> Hi,
> I'm trying ALSA on linux 2.5.70, it works fine but... when I try to unload
> module "snd" the kernel freeze without any message.
> Interrupts are enabled (I try this with the keyboard's leds :-), then I
> can't do anything but press the reset button.
> I'm using module-init-tools 0.9.12 and my config is:
> ...

Today I've tried the same thing (unload module "snd") on 2.5.69 without any problem...
so there is something wrong in patch-2.5.70.

Using some "printk" I found this:

static void __exit alsa_sound_exit(void)
        if (unregister_chrdev(major, "alsa") != 0) <-- kernel freeze!
                snd_printk(KERN_ERR "unable to unregister major device number %d\n", major);

SO I think that the problem is in last changes to "fs/char_dev.c"...
Viro, according to the changelog it seems that these changes are yours...

        [PATCH] cdev-cidr, part 1
        New object: struct cdev. It contains a kobject, a pointer to
        file_operations and a pointer to owner module. These guys have a search
        structure of the same sort as gendisks and chrdev_open() picks
        file_operations from them.
        Intended use: embed such animal in driver-owned structure (e.g.
        tty_driver) and register it as associated with given range of device
        numbers. Generic code will do lookup for such object and use it for the
        The behaviour of register_chrdev() is _not_ changed - it allocates
        struct cdev and registers it; any old driver will work as if nothing had

Viro, what do you think?

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Sun Jun 15 2003 - 22:00:36 EST