* [PATCH] ntb_perf: Fix an error code in perf_copy_chunk() @ 2018-01-23 8:33 ` Dan Carpenter 0 siblings, 0 replies; 6+ messages in thread From: Dan Carpenter @ 2018-01-23 8:33 UTC (permalink / raw) To: kernel-janitors We accidentally return success if dmaengine_submit() fails. The fix is to preserve the error code from dma_submit_error(). Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> diff --git a/drivers/ntb/test/ntb_perf.c b/drivers/ntb/test/ntb_perf.c index 8de72f3fba4d..387e685063fc 100644 --- a/drivers/ntb/test/ntb_perf.c +++ b/drivers/ntb/test/ntb_perf.c @@ -828,7 +828,8 @@ static int perf_copy_chunk(struct perf_thread *pthr, tx->callback_param = pthr; dma_set_unmap(tx, unmap); - if (dma_submit_error(dmaengine_submit(tx))) { + ret = dma_submit_error(dmaengine_submit(tx)); + if (ret) { dmaengine_unmap_put(unmap); goto err_free_resource; } ^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH] ntb_perf: Fix an error code in perf_copy_chunk() @ 2018-01-23 8:33 ` Dan Carpenter 0 siblings, 0 replies; 6+ messages in thread From: Dan Carpenter @ 2018-01-23 8:33 UTC (permalink / raw) To: Jon Mason, Serge Semin Cc: Dave Jiang, Allen Hubbe, Gary R Hook, Logan Gunthorpe, Greg Kroah-Hartman, linux-ntb, kernel-janitors We accidentally return success if dmaengine_submit() fails. The fix is to preserve the error code from dma_submit_error(). Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> diff --git a/drivers/ntb/test/ntb_perf.c b/drivers/ntb/test/ntb_perf.c index 8de72f3fba4d..387e685063fc 100644 --- a/drivers/ntb/test/ntb_perf.c +++ b/drivers/ntb/test/ntb_perf.c @@ -828,7 +828,8 @@ static int perf_copy_chunk(struct perf_thread *pthr, tx->callback_param = pthr; dma_set_unmap(tx, unmap); - if (dma_submit_error(dmaengine_submit(tx))) { + ret = dma_submit_error(dmaengine_submit(tx)); + if (ret) { dmaengine_unmap_put(unmap); goto err_free_resource; } ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] ntb_perf: Fix an error code in perf_copy_chunk() 2018-01-23 8:33 ` Dan Carpenter @ 2018-01-23 8:55 ` Serge Semin -1 siblings, 0 replies; 6+ messages in thread From: Serge Semin @ 2018-01-23 8:55 UTC (permalink / raw) To: kernel-janitors On Tue, Jan 23, 2018 at 11:33:56AM +0300, Dan Carpenter <dan.carpenter@oracle.com> wrote: > We accidentally return success if dmaengine_submit() fails. The fix is > to preserve the error code from dma_submit_error(). > Yep, absolutely right. Thanks! Acked-by: Serge Semin <fancer.lancer@gmail.com> > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> > > diff --git a/drivers/ntb/test/ntb_perf.c b/drivers/ntb/test/ntb_perf.c > index 8de72f3fba4d..387e685063fc 100644 > --- a/drivers/ntb/test/ntb_perf.c > +++ b/drivers/ntb/test/ntb_perf.c > @@ -828,7 +828,8 @@ static int perf_copy_chunk(struct perf_thread *pthr, > tx->callback_param = pthr; > dma_set_unmap(tx, unmap); > > - if (dma_submit_error(dmaengine_submit(tx))) { > + ret = dma_submit_error(dmaengine_submit(tx)); > + if (ret) { > dmaengine_unmap_put(unmap); > goto err_free_resource; > } ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] ntb_perf: Fix an error code in perf_copy_chunk() @ 2018-01-23 8:55 ` Serge Semin 0 siblings, 0 replies; 6+ messages in thread From: Serge Semin @ 2018-01-23 8:55 UTC (permalink / raw) To: Dan Carpenter Cc: Jon Mason, Dave Jiang, Allen Hubbe, Gary R Hook, Logan Gunthorpe, Greg Kroah-Hartman, linux-ntb, kernel-janitors On Tue, Jan 23, 2018 at 11:33:56AM +0300, Dan Carpenter <dan.carpenter@oracle.com> wrote: > We accidentally return success if dmaengine_submit() fails. The fix is > to preserve the error code from dma_submit_error(). > Yep, absolutely right. Thanks! Acked-by: Serge Semin <fancer.lancer@gmail.com> > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> > > diff --git a/drivers/ntb/test/ntb_perf.c b/drivers/ntb/test/ntb_perf.c > index 8de72f3fba4d..387e685063fc 100644 > --- a/drivers/ntb/test/ntb_perf.c > +++ b/drivers/ntb/test/ntb_perf.c > @@ -828,7 +828,8 @@ static int perf_copy_chunk(struct perf_thread *pthr, > tx->callback_param = pthr; > dma_set_unmap(tx, unmap); > > - if (dma_submit_error(dmaengine_submit(tx))) { > + ret = dma_submit_error(dmaengine_submit(tx)); > + if (ret) { > dmaengine_unmap_put(unmap); > goto err_free_resource; > } ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] ntb_perf: Fix an error code in perf_copy_chunk() 2018-01-23 8:55 ` Serge Semin @ 2018-01-24 4:07 ` Jon Mason -1 siblings, 0 replies; 6+ messages in thread From: Jon Mason @ 2018-01-24 4:07 UTC (permalink / raw) To: kernel-janitors On Tue, Jan 23, 2018 at 11:55:31AM +0300, Serge Semin wrote: > On Tue, Jan 23, 2018 at 11:33:56AM +0300, Dan Carpenter <dan.carpenter@oracle.com> wrote: > > We accidentally return success if dmaengine_submit() fails. The fix is > > to preserve the error code from dma_submit_error(). > > > > Yep, absolutely right. Thanks! > > Acked-by: Serge Semin <fancer.lancer@gmail.com> Applied to ntb-next Thanks, Jon > > > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> > > > > diff --git a/drivers/ntb/test/ntb_perf.c b/drivers/ntb/test/ntb_perf.c > > index 8de72f3fba4d..387e685063fc 100644 > > --- a/drivers/ntb/test/ntb_perf.c > > +++ b/drivers/ntb/test/ntb_perf.c > > @@ -828,7 +828,8 @@ static int perf_copy_chunk(struct perf_thread *pthr, > > tx->callback_param = pthr; > > dma_set_unmap(tx, unmap); > > > > - if (dma_submit_error(dmaengine_submit(tx))) { > > + ret = dma_submit_error(dmaengine_submit(tx)); > > + if (ret) { > > dmaengine_unmap_put(unmap); > > goto err_free_resource; > > } ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] ntb_perf: Fix an error code in perf_copy_chunk() @ 2018-01-24 4:07 ` Jon Mason 0 siblings, 0 replies; 6+ messages in thread From: Jon Mason @ 2018-01-24 4:07 UTC (permalink / raw) To: Serge Semin Cc: Dan Carpenter, Dave Jiang, Allen Hubbe, Gary R Hook, Logan Gunthorpe, Greg Kroah-Hartman, linux-ntb, kernel-janitors On Tue, Jan 23, 2018 at 11:55:31AM +0300, Serge Semin wrote: > On Tue, Jan 23, 2018 at 11:33:56AM +0300, Dan Carpenter <dan.carpenter@oracle.com> wrote: > > We accidentally return success if dmaengine_submit() fails. The fix is > > to preserve the error code from dma_submit_error(). > > > > Yep, absolutely right. Thanks! > > Acked-by: Serge Semin <fancer.lancer@gmail.com> Applied to ntb-next Thanks, Jon > > > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> > > > > diff --git a/drivers/ntb/test/ntb_perf.c b/drivers/ntb/test/ntb_perf.c > > index 8de72f3fba4d..387e685063fc 100644 > > --- a/drivers/ntb/test/ntb_perf.c > > +++ b/drivers/ntb/test/ntb_perf.c > > @@ -828,7 +828,8 @@ static int perf_copy_chunk(struct perf_thread *pthr, > > tx->callback_param = pthr; > > dma_set_unmap(tx, unmap); > > > > - if (dma_submit_error(dmaengine_submit(tx))) { > > + ret = dma_submit_error(dmaengine_submit(tx)); > > + if (ret) { > > dmaengine_unmap_put(unmap); > > goto err_free_resource; > > } ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2018-01-24 4:07 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2018-01-23 8:33 [PATCH] ntb_perf: Fix an error code in perf_copy_chunk() Dan Carpenter 2018-01-23 8:33 ` Dan Carpenter 2018-01-23 8:55 ` Serge Semin 2018-01-23 8:55 ` Serge Semin 2018-01-24 4:07 ` Jon Mason 2018-01-24 4:07 ` Jon Mason
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.