Calling nlmsg_multicast and nlmsg_new in softirq context, netfilter hook function

From: Nayan Gadre <hidden>
Date: 2023-08-09 14:33:07

Hi,

I have a netfilter hook attached at NF_NETDEV_INGRESS, very early in
the network stack. I am doing some filtering on the sk_buff and if it
matches a certain condition, I want to send a netlink event to an
application.

This will involve allocating a buffer to send using nlmsg_new, with
GFP_ATOMIC flag, as the hook will run in the bottom half and then call
nlmsg_multicast().

Is it safe to call these APIs in the softirq context / netfilter hook function?

Thanks
N Gadre.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help