On di, 16 jun 2020 09:51:00 +0000, Felix Riemann wrote: > Hi Kurt, > > > -----Original Message----- > > From: Kurt Van Dijck <dev.kurt@xxxxxxxxxxxxxxxxxxxxxx> > > Sent: Monday, June 15, 2020 5:31 PM > > Subject: Re: [PATCH] can: c_can: Handle lost bus-off interrupt while IRQs are > > disabled > > > > On ma, 15 jun 2020 11:11:17 +0000, Felix Riemann wrote: > > > > > > Hi Kurt, > > > > > > see below. > > > > > > > -----Original Message----- > > > > > > > > Hi Felix, > > > > > > > > Next question comes up. > > > > See inline. > > > > > > > > On vr, 12 jun 2020 09:10:44 +0200, Kurt Van Dijck wrote: > > > > > Thanks for verifying, > > > > > > > > > > I'll take a look how that can happen. > > > > > > > > > > I think packet loss is better (less packets lost) than before. > > > > > > > > > > Kurt > > > > > > > > > > On wo, 10 jun 2020 08:08:28 +0000, Felix Riemann wrote: > > > > > > Hi Kurt, > > > > > > > > > > > > > -----Original Message----- > > > > > > > > > > > > > > I have the impression that the recv path is covered, at least > > > > > > > the null ptr would have caused issued earlier already. > > > > > > > Would the problem arise in c_can_do_tx fetching a NULL echo_skb? > > > > > > > > > > > > It really looks like it. > > > > > > > > > > > > Adding a BUG_ON to the loop in c_can_do_tx triggers with a NULL > > > > > > skb > > > > returned by __can_get_echo_skb(). > > > > > > > > > > > > For testing I replaced the BUG_ON with a check that skips the > > > > > > skb if that > > > > happens (not sure if that would be a valid fix in that place): > > > > > > > > > > > > while ((obj = c_can_ffs64(pend))) { pend &= ~((u64)1 << (obj - > > > > > > 1)); c_can_inval_tx_object(dev, IF_RX, obj); idx = obj - > > > > > > priv->obj.send_frst; skb = __can_get_echo_skb(dev, idx, &len); > > > > > > if(!skb) > > > > > > > > It would be interesting to know idx and priv->tx_active here. > > > > > > That's the statistic over about 1600 lines I captured. First number is number > > of occurrences: > > > > just double-check: > > These are all when __can_get_echo_skb returned NULL? > > Yes, that's correct. The printout occurs directly before it skips to the next item in the loop. thanks.