* [PATCH RFT] net: Fix Neptune ethernet driver to check dma mapping error
@ 2012-07-20 21:27 Shuah Khan
2012-07-20 21:30 ` David Miller
0 siblings, 1 reply; 3+ messages in thread
From: Shuah Khan @ 2012-07-20 21:27 UTC (permalink / raw)
To: davem, mcarlson, bhutchings, eric.dumazet, mchan
Cc: netdev, LKML, shuahkhan, stable
Request for testing, since I don't have the hardware to test.
--------------------------------------------------------------------
Fix Neptune ethernet driver to check dma mapping error after map_page()
interface returns.
Signed-off-by: Shuah Khan <shuah.khan@hp.com>
Cc: <stable@vger.kernel.org>
---
drivers/net/ethernet/sun/niu.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/net/ethernet/sun/niu.c b/drivers/net/ethernet/sun/niu.c
index 8c726b7..60d5c03 100644
--- a/drivers/net/ethernet/sun/niu.c
+++ b/drivers/net/ethernet/sun/niu.c
@@ -3335,6 +3335,10 @@ static int niu_rbr_add_page(struct niu *np, struct rx_ring_info *rp,
addr = np->ops->map_page(np->device, page, 0,
PAGE_SIZE, DMA_FROM_DEVICE);
+ if (!addr) {
+ __free_page(page);
+ return -ENOMEM;
+ }
niu_hash_page(rp, page, addr);
if (rp->rbr_blocks_per_page > 1)
--
1.7.9.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH RFT] net: Fix Neptune ethernet driver to check dma mapping error
2012-07-20 21:27 [PATCH RFT] net: Fix Neptune ethernet driver to check dma mapping error Shuah Khan
@ 2012-07-20 21:30 ` David Miller
2012-07-20 21:36 ` Shuah Khan
0 siblings, 1 reply; 3+ messages in thread
From: David Miller @ 2012-07-20 21:30 UTC (permalink / raw)
To: shuah.khan
Cc: mcarlson, bhutchings, eric.dumazet, mchan, netdev, linux-kernel,
shuahkhan, stable
From: Shuah Khan <shuah.khan@hp.com>
Date: Fri, 20 Jul 2012 15:27:59 -0600
> Request for testing, since I don't have the hardware to test.
This is not how you post a patch.
> --------------------------------------------------------------------
When you put those "---..." there, GIT is going to eliminate everything
afterwards from the commit mesage when I apply this. Yet afterwards
is what your commit message actually is.
You therefore should do things the other way around, provide the commit
message text, then the "---..." line, then your comments you don't want
in the final commit message.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH RFT] net: Fix Neptune ethernet driver to check dma mapping error
2012-07-20 21:30 ` David Miller
@ 2012-07-20 21:36 ` Shuah Khan
0 siblings, 0 replies; 3+ messages in thread
From: Shuah Khan @ 2012-07-20 21:36 UTC (permalink / raw)
To: David Miller
Cc: mcarlson, bhutchings, eric.dumazet, mchan, netdev, linux-kernel, stable
On Fri, 2012-07-20 at 14:30 -0700, David Miller wrote:
> From: Shuah Khan <shuah.khan@hp.com>
> Date: Fri, 20 Jul 2012 15:27:59 -0600
>
> > Request for testing, since I don't have the hardware to test.
>
> This is not how you post a patch.
>
> > --------------------------------------------------------------------
>
> When you put those "---..." there, GIT is going to eliminate everything
> afterwards from the commit mesage when I apply this. Yet afterwards
> is what your commit message actually is.
>
> You therefore should do things the other way around, provide the commit
> message text, then the "---..." line, then your comments you don't want
> in the final commit message.
Thanks. I had it reversed in my head for some reason. Maybe not enough
coffee :) Will resend the patch now.
-- Shuah
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-07-20 21:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-20 21:27 [PATCH RFT] net: Fix Neptune ethernet driver to check dma mapping error Shuah Khan
2012-07-20 21:30 ` David Miller
2012-07-20 21:36 ` Shuah Khan
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.