Re: Updating variable shared between user and kernel space

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thursday 2009-03-26 15:00, Kristian Evensen wrote:
>
>I have a value I would like to share between userspace and kernelspace
>(it is store in my target struct and intialized in the user space part
>of my module), but when I update it in kernel space it gets the wrong
>value. When for example incrementing the value by 1 every time the
>rule matches, the values are all messed up (but never larger than the
>number of matches/increments). When creating and initializing the
>value in the module, it behaves correctly.

See the "Writing Netfilter Modules" e-book rev March 26 2009,
section 4.6 "SMP problems". I just updated this because xt_quota,
which serves as an example, was changed recently to account for
the RCU patches, and so the explanation needed to change too.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux