diff options
| author | Sander Vrijders <sander.vrijders@ugent.be> | 2017-04-06 13:25:17 +0200 | 
|---|---|---|
| committer | Sander Vrijders <sander.vrijders@ugent.be> | 2017-04-06 13:25:17 +0200 | 
| commit | b521232a103bc17d826d35f00f956bbbaa05b11d (patch) | |
| tree | c0d51a733404f96eb22b10be284a55786db12758 /src/ipcpd/shim-eth-llc | |
| parent | 34ef0da6c1b3a3419dbdf2041ed1e3ba107dc915 (diff) | |
| download | ouroboros-b521232a103bc17d826d35f00f956bbbaa05b11d.tar.gz ouroboros-b521232a103bc17d826d35f00f956bbbaa05b11d.zip | |
ipcpd: shim-eth-llc: Avoid handling mgmt frame under lock
This avoids handling the mgmt frames under lock, since it may deadlock
if a new mgmt frame arrives in the meantime.
Diffstat (limited to 'src/ipcpd/shim-eth-llc')
| -rw-r--r-- | src/ipcpd/shim-eth-llc/main.c | 7 | 
1 files changed, 3 insertions, 4 deletions
| diff --git a/src/ipcpd/shim-eth-llc/main.c b/src/ipcpd/shim-eth-llc/main.c index 34a25ee2..1b6e02c2 100644 --- a/src/ipcpd/shim-eth-llc/main.c +++ b/src/ipcpd/shim-eth-llc/main.c @@ -532,12 +532,11 @@ static void * eth_llc_ipcp_mgmt_handler(void * o)                          continue;                  } -                eth_llc_ipcp_mgmt_frame(frame->buf, frame->len, frame->r_addr); -                  list_del(&frame->next); -                free(frame); -                  pthread_mutex_unlock(ð_llc_data.mgmt_lock); + +                eth_llc_ipcp_mgmt_frame(frame->buf, frame->len, frame->r_addr); +                free(frame);          }  } | 
