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]
Date:	Mon, 05 Dec 2011 18:45:31 -0500 (EST)
From:	David Miller <davem@...emloft.net>
To:	romieu@...zoreil.com
Cc:	booster@...ke7.net, hayeswang@...ltek.com, jrnieder@...il.com,
	eric.dumazet@...il.com, netdev@...r.kernel.org,
	nic_swsd@...ltek.com, linux-kernel@...r.kernel.org,
	armin.kazmi@...dortmund.de
Subject: Re: [PATCH 2/2] r8169: fix Rx index race between FIFO overflow
 recovery and NAPI handler.

From: Francois Romieu <romieu@...zoreil.com>
Date: Mon, 5 Dec 2011 07:30:52 +0100

> Since 92fc43b4159b518f5baae57301f26d770b0834c9, rtl8169_tx_timeout ends up
> resetting Rx and Tx indexes and thus racing with the NAPI handler via
> -> rtl8169_hw_reset
>    -> rtl_hw_reset
>       -> rtl8169_init_ring_indexes
> 
> What about returning to the original state ?
> 
> rtl_hw_reset is only used by rtl8169_hw_reset and rtl8169_init_one.
> 
> The latter does not need rtl8169_init_ring_indexes because the indexes
> still contain their original values from the newly allocated network
> device private data area (i.e. 0).
> 
> rtl8169_hw_reset is used by:
> 1. rtl8169_down
>    Helper for rtl8169_close. rtl8169_open explicitely inits the indexes
>    anyway.
> 2. rtl8169_pcierr_interrupt
>    Indexes are set by rtl8169_reinit_task.
> 3. rtl8169_interrupt
>    rtl8169_hw_reset is needed when the device goes down. See 1.
> 4. rtl_shutdown
>    System shutdown handler. Indexes are irrelevant.
> 5. rtl8169_reset_task
>    Indexes must be set before rtl_hw_start is called.
> 6. rtl8169_tx_timeout
>    Indexes should not be set. This is the job of rtl8169_reset_task anyway.
> 
> The removal of rtl8169_hw_reset in rtl8169_tx_timeout and its move in
> rtl8169_reset_task do not change the analysis.
> 
> Signed-off-by: Francois Romieu <romieu@...zoreil.com>
> Cc: hayeswang <hayeswang@...ltek.com>

Applied.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ