Module: xenomai-3 Branch: next Commit: 27d313f8ce2dc3dbbd0151368dead13868c05851 URL: http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=27d313f8ce2dc3dbbd0151368dead13868c05851
Author: Philippe Gerum <r...@xenomai.org> Date: Fri Jun 16 18:07:26 2017 +0200 net/cap: fix panic in rtcap_signal_handler() --- kernel/drivers/net/addons/cap.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/kernel/drivers/net/addons/cap.c b/kernel/drivers/net/addons/cap.c index 7b8f4fe..78d5f56 100644 --- a/kernel/drivers/net/addons/cap.c +++ b/kernel/drivers/net/addons/cap.c @@ -195,11 +195,13 @@ static void rtcap_signal_handler(rtdm_nrtsig_t *nrtsig, void *arg) ifindex = rtskb->rtdev->ifindex; active = tap_device[ifindex].present; - if ((tap_device[ifindex].tap_dev->flags & IFF_UP) == 0) - active &= ~TAP_DEV; - if (active & RTMAC_TAP_DEV && - !(tap_device[ifindex].rtmac_tap_dev->flags & IFF_UP)) - active &= ~RTMAC_TAP_DEV; + if (active) { + if ((tap_device[ifindex].tap_dev->flags & IFF_UP) == 0) + active &= ~TAP_DEV; + if (active & RTMAC_TAP_DEV && + !(tap_device[ifindex].rtmac_tap_dev->flags & IFF_UP)) + active &= ~RTMAC_TAP_DEV; + } if (active == 0) { tap_device[ifindex].tap_dev_stats.rx_dropped++; _______________________________________________ Xenomai-git mailing list Xenomai-git@xenomai.org https://xenomai.org/mailman/listinfo/xenomai-git