OSDN Git Service

staging: fsl-dpaa2/eth: Fix potential endless loop
authorIoana Radulescu <ruxandra.radulescu@nxp.com>
Wed, 11 Oct 2017 13:29:43 +0000 (08:29 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Oct 2017 14:44:00 +0000 (16:44 +0200)
commit87eb55e418b7fc80feb21a87aac56c6efe0678e4
treed9c8785588602dfe38d2d989a05bd0795a77b087
parentce10d7b4e8e3574b9616e54a09d64521b9aeb8b6
staging: fsl-dpaa2/eth: Fix potential endless loop

We incorrectly assumed that dpaa2_io_release() can only
return -EBUSY as an error code, when in fact it can also
fail in case some of its arguments don't have valid values.

Make sure we only retry the operation while the portal is
busy and abort for all other error cases, otherwise we risk
entering an endless loop.

Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com>
Signed-off-by: Bogdan Purcareata <bogdan.purcareata@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c