On Thursday 13 February 2003 05:32, Joe Thornber wrote: > > Changes since 2.4.20-dm-7 > ------------------------- > > Revision 41: > Hook the io before we call the targets map function, this allows us to > implement little things like the zero target. Wahoo! :) Mike Tran and I noticed this yesterday, and were about to send you a nearly identical patch. Looks like you beat us to it. > Revision 42: > Silly mistake in error path when an unknown target type is requested. --- diff/drivers/md/dm-table.c 2003-01-10 10:20:07.000000000 +0000 +++ source/drivers/md/dm-table.c 2003-02-13 10:42:19.000000000 +0000 @@ -523,7 +523,7 @@ tgt->type = dm_get_target_type(type); if (!tgt->type) { tgt->error = "unknown target type"; - goto bad; + return r; } tgt->table = t; Should this patch actually be "return -EINVAL;" (or something similar)? Just above this, the call to check_space() sets r to 0, so this patch is going to return success to the caller of dm_table_add_target() in this error path. Along the same lines, the error path for the call to adjoin() will also end up returning success from this function. Patch 5 in the new 2.5.60 patchset has the same issue. The patch below ought to apply to both 2.4 and 2.5. -- Kevin Corry corryk@xxxxxxxxxx http://evms.sourceforge.net/ --- linux-2.4.20a/drivers/md/dm-table.c 2003/02/13 16:18:01 +++ linux-2.4.20b/drivers/md/dm-table.c 2003/02/13 16:19:39 @@ -523,7 +523,7 @@ tgt->type = dm_get_target_type(type); if (!tgt->type) { tgt->error = "unknown target type"; - return r; + return -EINVAL; } tgt->table = t; @@ -536,6 +536,7 @@ */ if (!adjoin(t, tgt)) { tgt->error = "Gap in table"; + r = -EINVAL; goto bad; }