CHROMIUM: gobi: Introduce refcounted buffers.
This prevents a use-after-free of URB content buffers that was added in
802a2d60b5a5859abf78c1289e24ce2e6a560255. The root cause for this failure was
that I changed the invariant required for a buffer (i.e., I required the buffer
to live past function exit) without changing the call sites. I have introduced a
reference-counted buffer type which we use to make sure the buffer lives until
the urb layer is done with it.
This has the pleasant side-effect of killing a lot of variables.
BUG=chromium-os:15346
TEST=network_GobiUncleanDisconnect
Change-Id: I322dea4c4022b381616b13de75b49f82e9f5cd05
Signed-off-by: Elly Jones <ellyjones@chromium.org>
Reviewed-on: http://gerrit.chromium.org/gerrit/933
Reviewed-by: Olof Johansson <olofj@chromium.org>