[ldv-project] [PATCH] e1000: avoid potential deadlock in e1000_do_[read|write]_eeprom()

Jeff Kirsher jeffrey.t.kirsher at intel.com
Sat Dec 28 18:12:43 MSK 2013


On Sat, 2013-12-21 at 02:25 +0400, Alexey Khoroshilov wrote:
> If eeprom->word_size is zero, e1000_do_[read|write]_eeprom() invoke
> e1000_init_eeprom_params() to reinit eeprom params.
> That is not a good idea since e1000_init_eeprom_params() calls
> e1000_read_eeprom() if eeprom->type is e1000_eeprom_spi.
> That means a deadlock on e1000_eeprom_lock.
> 
> At the same time it is unclear if the reinit is needed at all.
> e1000_init_eeprom_params() is called from probe, so
> it should succeed before any activities of the module start.
> 
> The patch suggests to remove the try to reinit eeprom params.
> 
> Found by Linux Driver Verification project (linuxtesting.org).
> 
> Signed-off-by: Alexey Khoroshilov <khoroshilov at ispras.ru>
> ---
>  drivers/net/ethernet/intel/e1000/e1000_hw.c | 8 --------
>  1 file changed, 8 deletions(-)

Sorry Alexey for the late reply, I thought I had responded to you
earlier.

I have added your patch to my queue.  Thanks!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <http://linuxtesting.org/pipermail/ldv-project/attachments/20131228/f06213ea/attachment.pgp>


More information about the ldv-project mailing list