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: <93198cab-7eeb-b4b6-bc0b-279c93da32cd@denx.de>
Date:   Tue, 6 Feb 2018 13:48:39 +0100
From:   Marek Vasut <marex@...x.de>
To:     Heiko Schocher <hs@...x.de>, linux-can@...r.kernel.org
Cc:     Markus Marb <markus@...b.org>, netdev@...r.kernel.org,
        Marc Kleine-Budde <mkl@...gutronix.de>,
        linux-kernel@...r.kernel.org,
        Wolfgang Grandegger <wg@...ndegger.com>
Subject: Re: [PATCH 1/2] net, can, ifi: fix "write buffer full" error

On 02/06/2018 01:02 PM, Heiko Schocher wrote:
> the driver reads in the ISR first the IRQpending register,
> and clears after that in a write *all* bits in it.
> 
> It could happen that the isr register raise bits between
> this 2 register accesses, which leads in lost bits ...
> 
> In case it clears "TX message sent successfully", the driver
> never sends any Tx data, and buffers to userspace run over.
> 
> Fixed this:
> clear only the bits in the IRQpending register, the
> driver had read.
> 
> Signed-off-by: Heiko Schocher <hs@...x.de>

Reviewed-by: Marek Vasut <marex@...x.de>

> ---
> 
>  drivers/net/can/ifi_canfd/ifi_canfd.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/can/ifi_canfd/ifi_canfd.c b/drivers/net/can/ifi_canfd/ifi_canfd.c
> index 2772d05ff11c..05feb8177936 100644
> --- a/drivers/net/can/ifi_canfd/ifi_canfd.c
> +++ b/drivers/net/can/ifi_canfd/ifi_canfd.c
> @@ -607,7 +607,7 @@ static irqreturn_t ifi_canfd_isr(int irq, void *dev_id)
>  		return IRQ_NONE;
>  
>  	/* Clear all pending interrupts but ErrWarn */
> -	writel(clr_irq_mask, priv->base + IFI_CANFD_INTERRUPT);
> +	writel(isr & clr_irq_mask, priv->base + IFI_CANFD_INTERRUPT);
>  
>  	/* RX IRQ or bus warning, start NAPI */
>  	if (isr & rx_irq_mask) {
> 


-- 
Best regards,
Marek Vasut

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ