netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Updating variable shared between user and kernel space
@ 2009-03-26 14:00 Kristian Evensen
  2009-03-26 14:26 ` Jan Engelhardt
  0 siblings, 1 reply; 3+ messages in thread
From: Kristian Evensen @ 2009-03-26 14:00 UTC (permalink / raw)
  To: netfilter-devel

Hello,

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.

I always though that if you try to accesses userspace varibles from
kernel space, you will get a seg. fault or similar, and am therefore a
little confused as to why this do not work. Does anybody know why
and/or how to share variables?

-Kristian

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-03-26 15:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-26 14:00 Updating variable shared between user and kernel space Kristian Evensen
2009-03-26 14:26 ` Jan Engelhardt
2009-03-26 15:29   ` Kristian Evensen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).