netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* netlink question
@ 2009-02-10 20:33 Giacomo
  0 siblings, 0 replies; only message in thread
From: Giacomo @ 2009-02-10 20:33 UTC (permalink / raw)
  To: netfilter-devel

Dear netfilter list.

I would like to ask you about a strange issue.

I wrote a software that communicates with kernel space via the netlink socket.

A data structure of 212 byte (+16 byte of netlink header) used to
travel from user to kernel space and viceversa
without any problem.
Inside kernel space, socket buffer is allocated with alloc_skb
together with GFP_ATOMIC flag.

Since a couple of fields in the structure have changed

from __u32 source_ip  to __u32 source_ip[50];

and equivalently __u32 dest_ip became  __u32 dest_ip[50];

__u16 sport;   ->  __u16 sport[50];

__u16 dport;   ->  __u16 dport[50];

kernel began to crash, reporting, among other messages "scheduling
while atomic".

The data structure is now grown up to 788bytes (+16 netlink header).

I introduced in the functions responsible of netlink communication
some printks reporting the value of
in_atomic();

while with little data structures I always read in_atomic() == 0,  in
the same actions, but with the bigger
data structure, sometimes i read in_atomic() == 1


Is there a possible reason for this behaviour?

If yes, how should the behaviour be corrected?

Thanks in advance.

Giacomo, Italy.





-- 
Giacomo S.
http://www.giacomos.it

- - - - - - - - - - - - - - - - - - - - - -

* Aprile 2008: iqfire-wall, un progetto
  open source che implementa un
  filtro di pacchetti di rete per Linux,
  e` disponibile per il download qui:
  http://sourceforge.net/projects/ipfire-wall

* Informazioni e pagina web ufficiale:
  http://www.giacomos.it/iqfire/index.html

- - - - - - - - - - - - - - - - - - - - - -

 . ''  `.
:   :'    :
 `.  ` '
    `- Debian GNU/Linux -- The power of freedom
        http://www.debian.org

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-02-10 20:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-10 20:33 netlink question Giacomo

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).