Re: Why exported const value modified by another driver not updatedin original driver
From: Alan Cox
Date: Tue Sep 04 2012 - 06:43:29 EST
On Tue, 4 Sep 2012 15:00:16 +0530
Manavendra Nath Manav <mnm.kernel@xxxxxxxxx> wrote:
> Hi,
>
> I have declared a static const int variable in one driver and exported
> that variable symbol. In another driver i am modifying that variable.
> The other driver prints the modified value but the original driver
> retains the original value. When both virtual and physical addresses
> of the variable as seen by both drivers are same, how is this even
> possible. Is it a kernel bug?
It's const, why is it even a surprise. If you don't understand what is
going on then I suggest you disassemble the code. That will I think let
you understand what is going on.
Alan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/