linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johan Hovold <johan@kernel.org>
To: Pavel Skripkin <paskripkin@gmail.com>
Cc: mailhol.vincent@wanadoo.fr, wg@grandegger.com,
	mkl@pengutronix.de, davem@davemloft.net, kuba@kernel.org,
	linux-can@vger.kernel.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] can: etas_es58x: fix error handling
Date: Mon, 15 Nov 2021 09:16:54 +0100	[thread overview]
Message-ID: <YZIXdnFQcDcC2QvE@hovoldconsulting.com> (raw)
In-Reply-To: <7a98b159-f9bf-c0dd-f244-aec6c9a7dcaa@gmail.com>

On Mon, Nov 15, 2021 at 11:15:07AM +0300, Pavel Skripkin wrote:
> On 11/15/21 11:11, Johan Hovold wrote:
> > Just a drive-by comment:
> > 
> > Are you sure about this move of the netdev[channel_idx] initialisation?
> > What happens if the registered can device is opened before you
> > initialise the pointer? NULL-deref in es58x_send_msg()?
> > 
> > You generally want the driver data fully initialised before you register
> > the device so this looks broken.
> > 
> > And either way it is arguably an unrelated change that should go in a
> > separate patch explaining why it is needed and safe.
> > 
> 
> 
> It was suggested by Vincent who is the maintainer of this driver [1].

Yeah, I saw that, but that doesn't necessarily mean it is correct.

You're still responsible for the changes you make and need to be able to
argue why they are correct.

Johan

  reply	other threads:[~2021-11-15  8:17 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-14 20:58 [PATCH] can: etas_es58x: fix error handling Pavel Skripkin
2021-11-15  5:27 ` Vincent MAILHOL
2021-11-15  7:40   ` Pavel Skripkin
2021-11-15  7:51   ` [PATCH v2] " Pavel Skripkin
2021-11-15  8:11     ` Johan Hovold
2021-11-15  8:15       ` Pavel Skripkin
2021-11-15  8:16         ` Johan Hovold [this message]
2021-11-15  8:30           ` Pavel Skripkin
2021-11-15  9:24             ` Vincent MAILHOL
2021-11-15  9:26               ` Pavel Skripkin
2021-11-15  8:37       ` [PATCH v3] " Pavel Skripkin
2021-11-15  9:15         ` Vincent MAILHOL

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=YZIXdnFQcDcC2QvE@hovoldconsulting.com \
    --to=johan@kernel.org \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=linux-can@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mailhol.vincent@wanadoo.fr \
    --cc=mkl@pengutronix.de \
    --cc=netdev@vger.kernel.org \
    --cc=paskripkin@gmail.com \
    --cc=wg@grandegger.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).