On Thu, 07 Nov 2013 23:23:18 -0800, kiran kumar said: > Can you define that location as read only(i.e constant)?. This is only for > debug prupose, later you can remove. Note that this requires 2 things: 1) A kernel built with CONFIG_DEBUG_RODATA=y 2) The structure needs to have a compile-time initializer: struct foo barbaz = { 5, 3, "quuz"}; Otherwise, your kernel will throw an oops when it tries to initialize the structure at runtime (which is almost certainly *not* the time that is causing the actual problem). Simply declaring it as 'const struct' may or may not help - this will catch at compile time lots of mistakes, but isn't guaranteed to stop all cases of buggy uses of miscast pointers, etc....
Attachment:
pgpa4tsctndQy.pgp
Description: PGP signature