Re: j1939 preempt_rt kernel support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10.07.2018 14:02, bacor@xxxxxxxx wrote:
> I ran into the exact same problem described in this thread:
> https://marc.info/?l=linux-can&m=144803311311632&w=4. I am using the
> exact same kernel, j1939 stack and target.
> 
> Unlike what it was done in this thread, I did not remove the
> put_session() function called in j1939tp_rxtask since it introduce a
> memory leak.
> 
> I managed to get it work by applying the following patch but I'm not
> sure if what this change entails ?
> 
> diff --git a/net/can/sj1939/transport.c b/net/can/sj1939/transport.c
> index 26eccc0..d336083 100644
> --- a/net/can/sj1939/transport.c
> +++ b/net/can/sj1939/transport.c
> @@ -119,8 +119,8 @@ static inline void j1939session_destroy(struct
> session *session)
>          kfree_skb(session->skb);
>      hrtimer_cancel(&session->rxtimer);
>      hrtimer_cancel(&session->txtimer);
> -    tasklet_disable(&session->rxtask);
> -    tasklet_disable(&session->txtask);
> +    tasklet_disable_nosync(&session->rxtask);
> +    tasklet_disable_nosync(&session->txtask);
>      kfree(session);
>  }
> 

Your code example looks ancient. I would recommend to use latest version:
https://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next.git/log/?h=j1939

Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [Automotive Discussions]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [CAN Bus]

  Powered by Linux