Skip to content
Snippets Groups Projects
Commit d849b4d9 authored by Florian Pose's avatar Florian Pose
Browse files

Datagram preallocation with ATOMIC flag, because it is calles in timer context.

parent 831ed705
No related branches found
No related tags found
No related merge requests found
...@@ -115,7 +115,7 @@ int ec_datagram_prealloc(ec_datagram_t *datagram, /**< EtherCAT datagram */ ...@@ -115,7 +115,7 @@ int ec_datagram_prealloc(ec_datagram_t *datagram, /**< EtherCAT datagram */
datagram->mem_size = 0; datagram->mem_size = 0;
} }
if (!(datagram->data = kmalloc(size, GFP_KERNEL))) { if (!(datagram->data = kmalloc(size, GFP_ATOMIC))) {
EC_ERR("Failed to allocate %i bytes of datagram memory!\n", size); EC_ERR("Failed to allocate %i bytes of datagram memory!\n", size);
return -1; return -1;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment