lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <942251933.544595.1614508531322@mail1.libero.it>
Date:   Sun, 28 Feb 2021 11:35:31 +0100 (CET)
From:   Dario Binacchi <dariobin@...ero.it>
To:     Marc Kleine-Budde <mkl@...gutronix.de>
Cc:     linux-kernel@...r.kernel.org,
        Alexander Stein <alexander.stein@...tec-electronic.com>,
        Federico Vaga <federico.vaga@...il.com>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Oliver Hartkopp <socketcan@...tkopp.net>,
        Vincent Mailhol <mailhol.vincent@...adoo.fr>,
        Wolfgang Grandegger <wg@...ndegger.com>,
        YueHaibing <yuehaibing@...wei.com>,
        Zhang Qilong <zhangqilong3@...wei.com>,
        linux-can@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [PATCH v2 3/6] can: c_can: fix control interface used by
 c_can_do_tx

Hi Marc,

> Il 26/02/2021 09:44 Marc Kleine-Budde <mkl@...gutronix.de> ha scritto:
> 
>  
> On 25.02.2021 22:51:52, Dario Binacchi wrote:
> > According to commit 640916db2bf7 ("can: c_can: Make it SMP safe") let RX use
> > IF1 (i.e. IF_RX) and TX use IF2 (i.e. IF_TX).
> 
> Is this a fix?
> 

I think that If I consider what is described in the 640916db2bf7 commit, using 
the IF_RX interface in a tx routine is wrong.

Thanks and regards
Dario

> Marc
> 
> > 
> > Signed-off-by: Dario Binacchi <dariobin@...ero.it>
> > ---
> > 
> > (no changes since v1)
> > 
> >  drivers/net/can/c_can/c_can.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/net/can/c_can/c_can.c b/drivers/net/can/c_can/c_can.c
> > index dbcc1c1c92d6..69526c3a671c 100644
> > --- a/drivers/net/can/c_can/c_can.c
> > +++ b/drivers/net/can/c_can/c_can.c
> > @@ -732,7 +732,7 @@ static void c_can_do_tx(struct net_device *dev)
> >  		idx--;
> >  		pend &= ~(1 << idx);
> >  		obj = idx + C_CAN_MSG_OBJ_TX_FIRST;
> > -		c_can_inval_tx_object(dev, IF_RX, obj);
> > +		c_can_inval_tx_object(dev, IF_TX, obj);
> >  		can_get_echo_skb(dev, idx, NULL);
> >  		bytes += priv->dlc[idx];
> >  		pkts++;
> > -- 
> > 2.17.1
> > 
> > 
> 
> -- 
> Pengutronix e.K.                 | Marc Kleine-Budde           |
> Embedded Linux                   | https://www.pengutronix.de  |
> Vertretung West/Dortmund         | Phone: +49-231-2826-924     |
> Amtsgericht Hildesheim, HRA 2686 | Fax:   +49-5121-206917-5555 |

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ