Re: [PATCH] et131x: fix allocation failures

2014-02-20 Thread Zhao, Gang
On Thu, 2014-02-20 at 17:03:39 +0800, Dan Carpenter wrote: > On Thu, Feb 20, 2014 at 11:03:45AM +0800, Zhao, Gang wrote: >> On Wed, 2014-02-19 at 19:43:15 +0800, One Thousand Gnomes wrote: >> > On Wed, 19 Feb 2014 09:14:19 +0800 >> > "Zhao\, Gang" wrote: >> > >> >> Alan, thanks for resending this

Re: [PATCH] et131x: fix allocation failures

2014-02-20 Thread Dan Carpenter
On Thu, Feb 20, 2014 at 11:03:45AM +0800, Zhao, Gang wrote: > On Wed, 2014-02-19 at 19:43:15 +0800, One Thousand Gnomes wrote: > > On Wed, 19 Feb 2014 09:14:19 +0800 > > "Zhao\, Gang" wrote: > > > >> Alan, thanks for resending this patch. But it seems you overlooked > >> something we discussed ear

Re: [PATCH] et131x: fix allocation failures

2014-02-19 Thread Zhao, Gang
On Wed, 2014-02-19 at 19:43:15 +0800, One Thousand Gnomes wrote: > On Wed, 19 Feb 2014 09:14:19 +0800 > "Zhao\, Gang" wrote: > >> Alan, thanks for resending this patch. But it seems you overlooked >> something we discussed earlier. >> >> On Mon, 2014-02-17 at 22:13:08 +0800, Alan wrote: >> > We s

Re: [PATCH] et131x: fix allocation failures

2014-02-19 Thread One Thousand Gnomes
On Wed, 19 Feb 2014 09:14:19 +0800 "Zhao\, Gang" wrote: > Alan, thanks for resending this patch. But it seems you overlooked > something we discussed earlier. > > On Mon, 2014-02-17 at 22:13:08 +0800, Alan wrote: > > We should check the ring allocations don't fail. > > If we get a fail we need t

Re: [PATCH] et131x: fix allocation failures

2014-02-18 Thread Zhao, Gang
Alan, thanks for resending this patch. But it seems you overlooked something we discussed earlier. On Mon, 2014-02-17 at 22:13:08 +0800, Alan wrote: > We should check the ring allocations don't fail. > If we get a fail we need to clean up properly. The allocator assumes the > deallocator will be u

[PATCH] et131x: fix allocation failures

2014-02-17 Thread Alan
We should check the ring allocations don't fail. If we get a fail we need to clean up properly. The allocator assumes the deallocator will be used on failure, but it isn't. Make sure the right deallocator is always called and add a missing check against fbr allocation failure. [v2]: Correct check

Re: [PATCH] et131x: fix allocation failures

2014-02-10 Thread One Thousand Gnomes
On Fri, 7 Feb 2014 09:15:40 + Mark Einon wrote: > On Wed, Feb 05, 2014 at 09:56:41PM +0800, Zhao, Gang wrote: > > > @@ -2124,7 +2124,11 @@ static int et131x_rx_dma_memory_alloc(struct > > > et131x_adapter *adapter) > > > > > > /* Alloc memory for the lookup table */ > > > rx_ring->fbr[

Re: [PATCH] et131x: fix allocation failures

2014-02-07 Thread Mark Einon
On Wed, Feb 05, 2014 at 09:56:41PM +0800, Zhao, Gang wrote: > > @@ -2124,7 +2124,11 @@ static int et131x_rx_dma_memory_alloc(struct > > et131x_adapter *adapter) > > > > /* Alloc memory for the lookup table */ > > rx_ring->fbr[0] = kmalloc(sizeof(struct fbr_lookup), GFP_KERNEL); > > + i

Re: [PATCH] et131x: fix allocation failures

2014-02-05 Thread Zhao, Gang
add Cc to devel mailing list On Wed, 2014-02-05 at 19:56:19 +0800, Alan wrote: > We should check the ring allocations don't fail. > If we get a fail we need to clean up properly. The allocator assumes the > deallocator will be used on failure, but it isn't. Fix this and add a > missing check again