Summary: Wrong xfer_funcs initialization in drivers/block/loop.c
Kernel Version: 2.5.68 and 2.5.69 (at least)
Status: NEW
Severity: normal
Owner: bugme-janitors@lists.osdl.org
Submitter: Reimar.Doeffinger@stud.uni-karlsruhe.de
Distribution: SuSE Linux Professional 8.1
Software Environment: gcc 3.2.2 (but should be independant of that...)
Problem Description:
In drivers/block/loop.c loop_register_transfer always fails because all entries
(instead of only first and seond) of the xfer_funcs array (in same file) are
initialized to non-zero values (&xor_funcs).
Solution:
Change
struct loop_func_table *xfer_funcs[MAX_LO_CRYPT] = {
&none_funcs,
&xor_funcs
};
to
struct loop_func_table *xfer_funcs[MAX_LO_CRYPT] = {
&none_funcs,
&xor_funcs,
0
};
in kernel version 2.4.20 there was only a comma after &xor_funcs:
struct loop_func_table *xfer_funcs[MAX_LO_CRYPT] = {
&none_funcs,
&xor_funcs,
};
which worked as well, but I guess it's better when the code doesn't depend on a
single comma.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/