All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marc Kleine-Budde <mkl@pengutronix.de>
To: laurent vaudoit <laurent.vaudoit@gmail.com>,
	linux-can@vger.kernel.org,
	Kurt Van Dijck <dev.kurt@vandijck-laurijssen.be>
Subject: Re: J1939 crash after receiving BAM frame and no DT frame
Date: Wed, 25 Nov 2015 15:59:42 +0100	[thread overview]
Message-ID: <5655CCDE.2090701@pengutronix.de> (raw)
In-Reply-To: <CAA7hF3zSyPFDEzuPWmwwBhTf3005U_g8fEV3ses5_i+Gi=_ecw@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1214 bytes --]

On 11/25/2015 02:39 PM, laurent vaudoit wrote:
>>> i have found a workaround, working with rtpatch, but not sure if this
>>> can be considered as a bug fix or not.
>>> in function j1939tp_rxtask, there is a call to j1939session_cancel,
>>> who call put_session
>>> and at the end of j1939tp_rxtask, we call put_session.
>>> if i comment this "second call" to put_session, the problem disappear.
>>
>> It seems that you added a memory leak because put_session if a ref
>> counter. You keep the session installed ... forever, or until a next
>> similar session is about to be created.
>>
>> I'm not sure either that this is the correct way to proceed.
> 
> i'm not sure i understand well.
> this seems weird for me to have one get_session and 2 put_session
> should'nt we have one get_session and one put_session only? (this is
> what i tried)?

Maybe copy/pasting your patch here make the discussion easier :)

Marc

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 455 bytes --]

  reply	other threads:[~2015-11-25 14:59 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-20 15:24 J1939 crash after receiving BAM frame and no DT frame laurent vaudoit
2015-11-23 12:51 ` Kurt Van Dijck
2015-11-23 20:09 ` Kurt Van Dijck
2015-11-25 10:28   ` laurent vaudoit
2015-11-25 13:26     ` Kurt Van Dijck
2015-11-25 13:39       ` laurent vaudoit
2015-11-25 14:59         ` Marc Kleine-Budde [this message]
2015-11-25 15:16           ` laurent vaudoit
2015-12-04 14:04             ` Kurt Van Dijck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5655CCDE.2090701@pengutronix.de \
    --to=mkl@pengutronix.de \
    --cc=dev.kurt@vandijck-laurijssen.be \
    --cc=laurent.vaudoit@gmail.com \
    --cc=linux-can@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.