2002-10-15 16:07:18

by Jeff Dike

[permalink] [raw]
Subject: uml-patch-2.5.42-2

The 2.5.42 patch I released last night was broken. This fixes those problems.

The build works again, and I merged the locking fixes that Oleg Drokin and
Nikita Danilov pointed out.

The patch is available at
http://uml-pub.ists.dartmouth.edu/uml/uml-patch-2.5.42-2.bz2

For the other UML mirrors and other downloads, see
http://user-mode-linux.sourceforge.net/dl-sf.html

Other links of interest:

The UML project home page : http://user-mode-linux.sourceforge.net
The UML Community site : http://usermodelinux.org

Jeff


2002-10-16 08:44:48

by Oleg Drokin

[permalink] [raw]
Subject: UML and 2.5.43

Hello!

I noticed that in 2.5.43 ubd does not work anymore until
you enable devfs support, since devfs_register is now only
return meaningful values if devfs is compiled, otherwise it
just returns NULL, and ubd treats this as error. Since UML
itself only uses that value for subsequent freeing of devfs node,
it is quite safe (returned NULL means nothing should be freed
later ;) )

Probably attached patch is one of the right things to do.
As additional bonus it fixes uninitialised variable usage ;)

Bye,
Oleg

# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
# ChangeSet 1.859 -> 1.860
# arch/um/drivers/ubd_kern.c 1.10 -> 1.11
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 02/10/16 [email protected] 1.860
# do not look at return values from devfs_register stuff
# --------------------------------------------
#
diff -Nru a/arch/um/drivers/ubd_kern.c b/arch/um/drivers/ubd_kern.c
--- a/arch/um/drivers/ubd_kern.c Wed Oct 16 12:41:24 2002
+++ b/arch/um/drivers/ubd_kern.c Wed Oct 16 12:41:24 2002
@@ -469,9 +469,7 @@
MAJOR_NR, n << UBD_SHIFT,
S_IFBLK | S_IRUSR | S_IWUSR | S_IRGRP |S_IWGRP,
&ubd_blops, NULL);
- if(real == NULL)
- goto out;
- ubd_dev[n].real = real;
+ ubd_dev[n].real = real;

if (fake_major) {
fake = devfs_register(ubd_fake_dir_handle, name,
@@ -479,20 +477,16 @@
n << UBD_SHIFT,
S_IFBLK | S_IRUSR | S_IWUSR | S_IRGRP |
S_IWGRP, &ubd_blops, NULL);
- if(fake == NULL)
- goto out_unregister;

- ubd_dev[n].fake = fake;
+ ubd_dev[n].fake = fake;
add_disk(fake_disk);
+
}

add_disk(disk);
make_ide_entries(disk->disk_name);
return(0);

- out_unregister:
- devfs_unregister(real);
- ubd_dev[n].real = NULL;
out:
return(-1);
}
@@ -700,6 +694,6 @@
{
int n = DEVICE_NR(inode->i_rdev);
struct ubd *dev = &ubd_dev[n];
- int err;
+ int err = -EISDIR;
if(dev->is_dir == 1)
goto out;

2002-10-16 10:17:09

by Jeff Dike

[permalink] [raw]
Subject: Re: [uml-devel] UML and 2.5.43

[email protected] said:
> Probably attached patch is one of the right things to do.
> As additional bonus it fixes uninitialised variable usage ;)

Cool, Mike Anderson was complaining about that, and I hadn't got around to
looking at it yet.

Jeff

2002-10-16 16:11:03

by Mike Anderson

[permalink] [raw]
Subject: Re: [uml-devel] UML and 2.5.43

Thanks Oleg I had found this late last night. It is good someone else
was seeing it also.


Jeff Dike [[email protected]] wrote:
> [email protected] said:
> > Probably attached patch is one of the right things to do.
> > As additional bonus it fixes uninitialised variable usage ;)
>
> Cool, Mike Anderson was complaining about that, and I hadn't got around to
> looking at it yet.
>
> Jeff
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
-andmike
--
Michael Anderson
[email protected]

2002-10-17 00:25:49

by Jeff Dike

[permalink] [raw]
Subject: Re: UML and 2.5.43

[email protected] said:
> Probably attached patch is one of the right things to do.
> As additional bonus it fixes uninitialised variable usage ;)

Applied, thanks.

Jeff