lkml.org 
[lkml]   [2005]   [Dec]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] forcedeth: fix random memory scribbling bug
Linus Torvalds wrote:
> However, that
>
> "skb->end - skb->data"
>
> calculation is a bit strange. It correctly maps the whole skb, but

nod


> wouldn't it make more sense to use the length we actually tell the card to
> use?
>
> In other words, wouldn't it be a whole lot more sensible and logical to
> use
>
> np->rx_buf_sz
>
> instead? That's the value we use for allocation and that's the size we
> tell the card we have.

That's the sort of thing I prefer.


> Of course, on the alloc path, it seems to add an additional
> "NV_RX_ALLOC_PAD" thing, so maybe the "end-data" thing makes sense.

None of the other ethernet drivers do 'end - data', which is why I
hesitated quite a bit on this change.

Jeff


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-12-24 21:01    [W:0.055 / U:0.516 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site