Netlink sockets in kernel and ethernet driver. Kernel crash.
Greetings to all.
I can not understand in what a problem.
I write the network driver. Transmission of packets in user space I do through netlink socket`s. In user space there is a handling of packets and their transmission on other device (however, it isn't important).
Problem in that any time, packets through the driver in system, and is reverse, are transferred normally. But then there comes the moment when the kernel crash. If to look in syslog it seems to me that comes deadlock. Also I think that it is related with netlink socket`s.
I can't find the information on that anywhere how correctly to use netlink socket`s in kernel space. Can at you will any a reason into the account of synchronization of sockets and the driver in kernel space?
I can give the driver code if it is necessary.
P.S. Sorry for my bad english ;)
I found the answer to question.
When i call netlink_kernel_create, in the first parameter i specified &init_net. Now i call register_pernet_device to create another struct net* copy. And now the kernel doesn't crash.
dose it possible that you provide me ur source code i am trying to write network driver using socket in kernel
if you don't mind
|All times are GMT -5. The time now is 06:58 AM.|