diff options
author | Mike Marciniszyn <mike.marciniszyn@intel.com> | 2020-06-23 16:43:22 -0400 |
---|---|---|
committer | Jason Gunthorpe <jgg@nvidia.com> | 2020-06-24 16:13:38 -0300 |
commit | 82172b765530f84b4b9da929f2dcf46f2b7b232b (patch) | |
tree | 0cad4abea1e1cf9a132ab10dbe2457e42207fdb2 /include/media | |
parent | 822fbd37410639acdae368ea55477ddd3498651d (diff) |
IB/hfi1: Correct -EBUSY handling in tx code
The current code mishandles -EBUSY in two ways:
- The flow change doesn't test the return from the flush and runs on to
process the current packet racing with the wakeup processing
- The -EBUSY handling for a single packet inserts the tx into the txlist
after the submit call, racing with the same wakeup processing
Fix the first by dropping the skb and returning NETDEV_TX_OK.
Fix the second by insuring the the list entry within the txreq is inited
when allocated. This enables the sleep routine to detect that the txreq
has used the non-list api and queue the packet to the txlist.
Both flaws can lead to having the flushing thread executing in causing two
threads to manipulate the txlist.
Fixes: d99dc602e2a5 ("IB/hfi1: Add functions to transmit datagram ipoib packets")
Link: https://lore.kernel.org/r/20200623204321.108092.83898.stgit@awfm-01.aw.intel.com
Reviewed-by: Kaike Wan <kaike.wan@intel.com>
Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'include/media')
0 files changed, 0 insertions, 0 deletions