[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20180917.190308.350168193472877492.davem@davemloft.net>
Date: Mon, 17 Sep 2018 19:03:08 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: baijiaju1990@...il.com
Cc: hayashi.kunihiko@...ionext.com, yamada.masahiro@...ionext.com,
robh@...nel.org, andrew@...n.ch, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] net: socionext: Fix two sleep-in-atomic-context bugs
in ave_rxfifo_reset()
From: Jia-Ju Bai <baijiaju1990@...il.com>
Date: Sat, 15 Sep 2018 12:02:46 +0800
> The driver may sleep with holding a spinlock.
> The function call paths (from bottom to top) in Linux-4.17 are:
>
> [FUNC] usleep_range
> drivers/net/ethernet/socionext/sni_ave.c, 892:
> usleep_range in ave_rxfifo_reset
> drivers/net/ethernet/socionext/sni_ave.c, 932:
> ave_rxfifo_reset in ave_irq_handler
>
> [FUNC] usleep_range
> drivers/net/ethernet/socionext/sni_ave.c, 888:
> usleep_range in ave_rxfifo_reset
> drivers/net/ethernet/socionext/sni_ave.c, 932:
> ave_rxfifo_reset in ave_irq_handler
>
> To fix these bugs, usleep_range() is replaced with udelay().
>
> These bugs are found by my static analysis tool DSAC.
>
> Signed-off-by: Jia-Ju Bai <baijiaju1990@...il.com>
Applied to net-next.
Powered by blists - more mailing lists