Bug 8242

Summary: BLK_DEV_MD=m without CONFIG_NET misses csum_partial
Product: IO/Storage Reporter: Randy Dunlap (randy.dunlap)
Component: MDAssignee: io_md
Status: CLOSED PATCH_ALREADY_AVAILABLE    
Severity: normal CC: bunk
Priority: P2    
Hardware: i386   
OS: Linux   
Kernel Version: 2.6.21-rc4-git4 Subsystem:
Regression: --- Bisected commit-id:

Description Randy Dunlap 2007-03-20 20:04:12 UTC
Most recent kernel where this bug did *NOT* occur:  none
Distribution:  SLES 10 (not applicable)
Hardware Environment:  x86_64
Software Environment:
Problem Description:

drivers/md/md.c calls csum_partial().

IF CONFIG_NET=n and BLK_DEV_MD=y, if arch/*/lib/Makefile
puts csum-partial.o or checksum.o into lib-y, the function
is present.  (Of course, if the function is placed in
obj-y, there is no problem.)

If CONFIG_NET=n and BLK_DEV_MD=n, if arch/*/lib/Makefile
puts csum-partial.o or checksum.o into lib-y, the function
is removed from the kernel image due to having no built-in
callers.

Steps to reproduce:

Build a kernel with CONFIG_NET-n and CONFIG_BLK_DEV_MD=m.
Unless csum_partial() is built and kept by some arch Makefile,
the result is:
ERROR: "csum_partial" [drivers/md/md-mod.ko] undefined!
make[1]: *** [__modpost] Error 1
make: *** [modules] Error 2
Comment 1 Adrian Bunk 2008-04-28 02:27:28 UTC
md no longer uses csum_partial