]> git.baikalelectronics.ru Git - kernel.git/commit
module: workaround duplicate section names
authorJames Bottomley <James.Bottomley@HansenPartnership.com>
Wed, 26 Aug 2009 12:34:12 +0000 (22:04 +0930)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 27 Aug 2009 19:33:19 +0000 (12:33 -0700)
commit42710204be7294cb16baeaf83fe9b02f7d15d365
tree878d30319bd3721c6075eef8f3341c6fa9a5afd6
parent4a8f75340681d23ac281d94d742f9598607ae52e
module: workaround duplicate section names

The root cause is a duplicate section name (.text); is this legal?
[ Amerigo Wang: "AFAIK, yes." ]

However, there's a problem with commit
353b4004f132b6598235dd6fc68151a2b0f35c99 in that if you fail to allocate
a mod->sect_attrs (in this case it's null because of the duplication),
it still gets used without checking in add_notes_attrs()

This should fix it

[ This patch leaves other problems, particularly the sections directory,
  but recent parisc toolchains seem to produce these modules and this
  prevents a crash and is a minimal change -- RR ]

Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Tested-by: Helge Deller <deller@gmx.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
kernel/module.c