I haven't done any Linux kernel debugging other than one small project so long ago that even if I remembered how, it wouldn't remain relevant.
So I lack the time and probably the expertise to do anything with your code. I also doubt others reading this thread have the time.
Regarding your first post in this thread, I'm pretty sure those casts are not directly relevant to the problem that causes your kernel panic.
If you have some random memory clobber and/or error in allocating, deallocating or mapping the memory, it is very possible for "stirring the pot" to move the symptoms around. That means you might make some change that is not related to the bug but will move or hide the symptoms.
I think those casts are just stirring the pot (not somehow fixing some bug). As I said before, I don't really understand how they are even stirring the pot. I would have expected the compiler to filter out all effects of that code change. So if you could post the before and after versions of that chunk of assembler code, I might give you some insight about it. But I'm not going to try to generate that before and after assembler code myself. Even if I wanted to spend the time, there are too many other variables between what you did and what I might do.
It looks like you were getting better help in your related previous thread
http://www.linuxquestions.org/questi...-array-760651/
But maybe you didn't really solve that problem, just moved the symptoms. I can't help noticing the similarity between the kind of problem you have in this thread and the kind of problem you would have if you hadn't gotten the solution to that thread quite right.