mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [Bug 668] New: Wrong xfer_funcs initialization in drivers/block/loop.c
@ 2003-05-06 15:00 Martin J. Bligh
  0 siblings, 0 replies; only message in thread
From: Martin J. Bligh @ 2003-05-06 15:00 UTC (permalink / raw)
  To: linux-kernel

http://bugme.osdl.org/show_bug.cgi?id=668

           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.



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-05-06 14:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-06 15:00 [Bug 668] New: Wrong xfer_funcs initialization in drivers/block/loop.c Martin J. Bligh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®