Re: 2.1.80 miscellanea

Itai Nahshon (
Thu, 22 Jan 1998 02:56:14 +0200

Thomas Sailer wrote:
> + if (mixer_devs[dev]->name)
> + strncpy(, mixer_devs[dev]->name, sizeof(;

Changing everything to strncpy is good. Your added test is wrong because
name is an array (not char *) member and cannot be NULL.

Similar changes can be done for get_mixer_info.

Notice that mixer_devs[dev] can be NULL. It is okay to open /dev/mixer0
even if there is no mixer installed. That is usually not the case.

Also, almost any mixer ioctl is possible with other sound devices
(well, so it was meant to be) but there is a bug in the sound driver
which passes the device minor number and not the dev number (minor >>
This will usually fail the test for (dev < 0 || dev >= num_mixers).

IMHO, Thomas' fix (I had a similar one sent to Alan before) clears the
Oops but does not fix the bug, I do not know what the bug is yet
(the ioctl works fine with a good arg, so the Oops is probably from
__copy_to_user). Is there a utility to examine in-memory structures?
I think that somehow the ex_table got corrupted or just not produced
right for this code (this is a long shot... I will check it).


Itai Nahshon