2000-12-28 23:34:58

by Jeff V. Merkey

[permalink] [raw]
Subject: 2.2.19 hard hang from userspace while accessing /dev/mdXX devices


Hard hand in 2.2.19

If you open a non-existant md device (i.e. /dev/md11) from userspace
with an open() call, then send an ioctl() command, it results in the
following message then hard hangs the entire system if you attempt
to open any /dev/mdXX device with a minor number greater than 10.
Used to work on 2.2.17.

message is:

md map 11
bap map 11 ll_rw_block


offending code that causes the hard hang is:


register int fd, ccode;
struct hd_geometry geometry;

fd = open("/dev/md11", O_RDWR);
if (fd < 0)
return 1;

#ifdef HDIO_REQ
ccode = ioctl(fd, HDIO_REQ, &geometry);
#else
ccode = ioctl(fd, HDIO_GETGEO, &geometry);
#endif
if ((ccode == -EINVAL) || (ccode == -ENODEV))
{
close(fd);
return 1;
}
close(fd)
return 0;


Jeff


2000-12-28 23:38:48

by Alan

[permalink] [raw]
Subject: Re: 2.2.19 hard hang from userspace while accessing /dev/mdXX devices

> If you open a non-existant md device (i.e. /dev/md11) from userspace
> with an open() call, then send an ioctl() command, it results in the
> following message then hard hangs the entire system if you attempt
> to open any /dev/mdXX device with a minor number greater than 10.
> Used to work on 2.2.17.

What does 2.2.18 show and which raid patches are you using if any on them


2000-12-28 23:44:48

by Jeff V. Merkey

[permalink] [raw]
Subject: Re: 2.2.19 hard hang from userspace while accessing /dev/mdXX devices

On Thu, Dec 28, 2000 at 11:09:34PM +0000, Alan Cox wrote:
> > If you open a non-existant md device (i.e. /dev/md11) from userspace
> > with an open() call, then send an ioctl() command, it results in the
> > following message then hard hangs the entire system if you attempt
> > to open any /dev/mdXX device with a minor number greater than 10.
> > Used to work on 2.2.17.
>
> What does 2.2.18 show and which raid patches are you using if any on them

2.2.18 pre 27 (2.2.18) exhibits identical behavior. I am not using any
RAID patches. SPEC file used to build the kernel RPM is attached. I am
using the IPVS patch, and an iBCS2 patch (which does not touch the kernel,
just iBCS). The SPEC file lists all the patches being applied to this
kernel.

Jeff

>
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [email protected]
> Please read the FAQ at http://www.tux.org/lkml/


Attachments:
kernel-2.2.18.spec (19.75 kB)