No it's NOT!
The whole point here is that the sg had *already* better be cleared.
If it wasn't cleared before, that's a bug regardless of anything else. So
a memset() is guaranteed to be either a no-op or hiding another bug!
So yes, those members had better be zero. It's just that they had better
be zero long before that memset! The memset should have been done when
allocating the SG list.
Really? Explain why. Entering that code with a non-initialized SG list is
a bug to begin with.
Linus
-