Re: [PATCH 1/3] relay: Fix 4 off-by-one errors occuring when writing to a CPU buffer.

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Eduard - Gabriel Munteanu <eduard.munteanu@...>
Cc: <penberg@...>, <akpm@...>, <compudj@...>, <linux-kernel@...>, <righi.andrea@...>
Date: Saturday, June 14, 2008 - 12:40 am

Hi,

On Fri, 2008-06-13 at 04:09 +0300, Eduard - Gabriel Munteanu wrote:

I'm wondering if the all-zeroes at the end of the buffer might be
another case of the all-zeroes you were seeing due to cross-cpu reading
you decribed in the other patch.  In any case, I'm pretty sure this
patch isn't doing what you think it is, and don't see how it could have
fixed the problem (see below).  There may still be a bug somewhere, but
it would be good to be able to reproduce it.  Does it happen even when
running on a single cpu?


The original code basically says, "if the current write won't fit in the
remaining space in current subbuffer, move on to the next sub-buffer".
Your change makes it "if the current write won't fit in the current
subbuffer or if it exactly fits, move on to the next sub-buffer", which
isn't what we want.


Same thing here.


This case, offset being 1 larger than the subbuf size, is how we note a
full sub-buffer, so changing this will break full-subbuffer cases. 


Same here.

Tom



--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 1/3] relay: Fix 4 off-by-one errors occuring when wri..., Eduard - Gabriel Munteanu..., (Thu Jun 12, 9:09 pm)
Re: [PATCH 1/3] relay: Fix 4 off-by-one errors occuring when..., Tom Zanussi, (Sat Jun 14, 12:40 am)
Re: [PATCH 1/3] relay: Fix 4 off-by-one errors occuring when..., Eduard - Gabriel Munteanu..., (Sat Jun 14, 10:52 am)
Re: [PATCH 1/3] relay: Fix 4 off-by-one errors occuring when..., Eduard - Gabriel Munteanu..., (Fri Jun 20, 10:06 pm)
Re: [PATCH 1/3] relay: Fix 4 off-by-one errors occuring when..., Eduard - Gabriel Munteanu..., (Wed Jul 30, 1:48 pm)
Re: [PATCH 1/3] relay: Fix 4 off-by-one errors occuring when..., Eduard - Gabriel Munteanu..., (Thu Aug 14, 12:35 pm)