Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1457751
| From | okaya@codeaurora.org |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] dmaengine: qcom_hidma: release the descriptor before the callback |
| Date | 2016-08-08 14:20 +0200 |
| Message-ID | <s3RHb-1ii-3@gated-at.bofh.it> (permalink) |
| References | (2 earlier) <rYkVz-4mo-3@gated-at.bofh.it> <rYP3k-5F3-15@gated-at.bofh.it> <s2qg1-IE-1@gated-at.bofh.it> <s2rF7-1SU-11@gated-at.bofh.it> <s3OpX-7tU-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 2016-08-08 04:51, Vinod Koul wrote: > >> This patch is needed to fix a race condition as the commit message >> describes. >> The callback is called before returning the descriptor back to free >> pool. >> >> If the client calls free resources, the descriptor that was not >> returned to free pool gets lost due >> to race condition. > > Hmmm, if you have txn's pending and client wants to free up, shouldn't > the pending txn's be cleaned up? Sound like a different bug to me.. > > So if I submit 5 txn's and now want to freeup, will you still leak > descriptors? Doesn't sound as right behaviour to me. > If free is called from the callback, current code will leak the current descriptor where free was called. It will release the other 4. Because of ordering problem, descriptor is not in the active, pending or free pool. I check pending txn by looking at active and queued lists when free is called. After the callback, I put the descriptor back to free pool. At this moment, it is already too late. >> I'll refactor the code after Dave's change for passing the error code >> while calling the >> callback. That will be a different patch anyhow. > > Yes the error reporting is different
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
Re: [PATCH] dmaengine: qcom_hidma: release the descriptor before the callback Vinod Koul <vinod.koul@intel.com> - 2016-08-04 14:50 +0200
Re: [PATCH] dmaengine: qcom_hidma: release the descriptor before the callback Sinan Kaya <okaya@codeaurora.org> - 2016-08-04 16:20 +0200
Re: [PATCH] dmaengine: qcom_hidma: release the descriptor before the callback Russell King - ARM Linux <linux@armlinux.org.uk> - 2016-08-04 16:50 +0200
Re: [PATCH] dmaengine: qcom_hidma: release the descriptor before the callback Russell King - ARM Linux <linux@armlinux.org.uk> - 2016-08-04 17:40 +0200
Re: [PATCH] dmaengine: qcom_hidma: release the descriptor before the callback Sinan Kaya <okaya@codeaurora.org> - 2016-08-04 18:10 +0200
Re: [PATCH] dmaengine: qcom_hidma: release the descriptor before the callback Lars-Peter Clausen <lars@metafoo.de> - 2016-08-04 18:20 +0200
Re: [PATCH] dmaengine: qcom_hidma: release the descriptor before the callback Robert Jarzmik <robert.jarzmik@free.fr> - 2016-08-05 08:40 +0200
Re: [PATCH] dmaengine: qcom_hidma: release the descriptor before the callback Lars-Peter Clausen <lars@metafoo.de> - 2016-08-05 10:40 +0200
Re: [PATCH] dmaengine: qcom_hidma: release the descriptor before the callback Sinan Kaya <okaya@codeaurora.org> - 2016-08-05 17:20 +0200
Re: [PATCH] dmaengine: qcom_hidma: release the descriptor before the callback Lars-Peter Clausen <lars@metafoo.de> - 2016-08-04 18:10 +0200
Re: [PATCH] dmaengine: qcom_hidma: release the descriptor before the callback Vinod Koul <vinod.koul@intel.com> - 2016-08-08 11:10 +0200
Re: [PATCH] dmaengine: qcom_hidma: release the descriptor before the callback Lars-Peter Clausen <lars@metafoo.de> - 2016-08-08 14:30 +0200
Re: [PATCH] dmaengine: qcom_hidma: release the descriptor before the callback Vinod Koul <vinod.koul@intel.com> - 2016-08-10 20:50 +0200
Re: [PATCH] dmaengine: qcom_hidma: release the descriptor before the callback Sinan Kaya <okaya@codeaurora.org> - 2016-08-04 17:40 +0200
Re: [PATCH] dmaengine: qcom_hidma: release the descriptor before the callback Vinod Koul <vinod.koul@intel.com> - 2016-08-08 11:00 +0200
Re: [PATCH] dmaengine: qcom_hidma: release the descriptor before the callback Sinan Kaya <okaya@codeaurora.org> - 2016-08-08 16:50 +0200
Re: [PATCH] dmaengine: qcom_hidma: release the descriptor before the callback Vinod Koul <vinod.koul@intel.com> - 2016-08-10 21:00 +0200
Re: [PATCH] dmaengine: qcom_hidma: release the descriptor before the callback Sinan Kaya <okaya@codeaurora.org> - 2016-08-10 22:50 +0200
Re: [PATCH] dmaengine: qcom_hidma: release the descriptor before the callback Vinod Koul <vinod.koul@intel.com> - 2016-08-08 10:50 +0200
Re: [PATCH] dmaengine: qcom_hidma: release the descriptor before the callback okaya@codeaurora.org - 2016-08-08 14:20 +0200
csiph-web