[riot-devel] question on a possibility for a netdev deadlock

Martin martin.landsmann at haw-hamburg.de
Wed Jun 24 09:54:09 CEST 2015

Hi all,

I've tested the ng_ stack with samr21-xpro boards using the new 
ng_at86rf2xx driver.
Since I sometimes encountered hardfaults I took a look in the ISR 
handling of the driver [1].

There we handle incoming packets when the receiver has finished the RX 
process [2].
Since we are in a ISR, all other processes has been interrupted.

Now when we call _receive_data() function inside the ISR, that in turn 
calls pktbuf handling/manipulating functions [3],
we try to acquire the mutex protecting the pktbuf [4].

Since we are still inside of the ISR probably the mutex is acquired by 
someone else.
If true this leads to a deadlock since the ISR would wait forever to 
acquire the mutex and never return to leave the ISR.

Additionally if we successfully acquire the mutex,
we could produce inconsistencies iff the protection is not performed 

Just wanted to ask if I'm mistaken here and missed something.

Best regards,


More information about the devel mailing list