From: Marc Kleine-Budde <mkl@pengutronix.de>
To: Manfred Schlaegl <manfred.schlaegl@ginzinger.com>,
Wolfgang Grandegger <wg@grandegger.com>,
"David S. Miller" <davem@davemloft.net>
Cc: linux-can@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Revert "can: dev: __can_get_echo_skb(): print error message, if trying to echo non existing skb"
Date: Fri, 4 Jan 2019 16:23:26 +0100 [thread overview]
Message-ID: <976e38b6-072e-a88b-b51d-e85a37fc71ea@pengutronix.de> (raw)
In-Reply-To: <eaac34af-7058-e434-7d39-7cb221e5ea88@ginzinger.com>
[-- Attachment #1.1: Type: text/plain, Size: 1334 bytes --]
On 12/19/18 7:39 PM, Manfred Schlaegl wrote:
> This reverts commit 7da11ba5c5066dadc2e96835a6233d56d7b7764a.
>
> After introduction of this change we encountered following new error
> message on various i.MX plattforms (flexcan)
> flexcan 53fc8000.can can0: __can_get_echo_skb: BUG! Trying to echo non
> existing skb: can_priv::echo_skb[0]
Doh! I should have tested more extensive. Sorry.
> The introduction of the message was a mistake because
> priv->echo_skb[idx] = NULL is a perfectly valid in following case:
> If CAN_RAW_LOOPBACK is disabled (setsockopt) in applications, the
> pkt_type of the tx skb's given to can_put_echo_skb is set to
> PACKET_LOOPBACK. In this case can_put_echo_skb will not set
> priv->echo_skb[idx]. It is therefore kept NULL.
>
> (As additional argument for revert: The order of check and usage of idx
> was changed. idx is used to access an array element before checking it's
> boundaries)
>
> Signed-off-by: Manfred Schlaegl <manfred.schlaegl@ginzinger.com>
Applied to linux-can.
Tnx,
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: 488 bytes --]
next prev parent reply other threads:[~2019-01-04 15:23 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-19 18:39 Manfred Schlaegl
2019-01-04 15:23 ` Marc Kleine-Budde [this message]
2019-01-07 8:50 ` Manfred Schlaegl
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=976e38b6-072e-a88b-b51d-e85a37fc71ea@pengutronix.de \
--to=mkl@pengutronix.de \
--cc=davem@davemloft.net \
--cc=linux-can@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=manfred.schlaegl@ginzinger.com \
--cc=netdev@vger.kernel.org \
--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
all inboxes | Powered by JetHome®