X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?p=palacios.git;a=blobdiff_plain;f=linux_module%2Fiface-packet.c;h=3acb4bf61259193ee051324f9bf6853a94c4de8f;hp=f3562b09035827c873e4eb6e112bb632318159f3;hb=80a7fd2f343c65c00d84bc64181d0e9720ae20a6;hpb=f7e83e5d2d00ba107ccda346da4660ab523471bb diff --git a/linux_module/iface-packet.c b/linux_module/iface-packet.c index f3562b0..3acb4bf 100644 --- a/linux_module/iface-packet.c +++ b/linux_module/iface-packet.c @@ -252,7 +252,11 @@ palacios_packet_connect(struct v3_packet * packet, iface = find_interface(host_nic); if(iface == NULL){ - iface = (struct raw_interface *)kmalloc(sizeof(struct raw_interface), GFP_KERNEL); + iface = (struct raw_interface *)kmalloc(sizeof(struct raw_interface), GFP_ATOMIC); + if (!iface) { + printk("Palacios Packet Interface: Fails to allocate interface\n"); + return -1; + } if(init_raw_interface(iface, host_nic) != 0) { printk("Palacios Packet Interface: Fails to initiate an raw interface on device %s\n", host_nic); kfree(iface);