diff options
author | Zach Brown <zach.brown@oracle.com> | 2010-07-06 15:04:34 -0700 |
---|---|---|
committer | Andy Grover <andy.grover@oracle.com> | 2010-09-08 18:16:36 -0700 |
commit | d455ab64096b9a86849c7315c53e595330842db6 (patch) | |
tree | 2e02538ae4cb9c708c5dd474d7fbd739a31c0ab1 /drivers/hid/hid-lg.c | |
parent | 80c51be56ffa257d3177f0d750d90be65d30c22f (diff) | |
download | blackbird-op-linux-d455ab64096b9a86849c7315c53e595330842db6.tar.gz blackbird-op-linux-d455ab64096b9a86849c7315c53e595330842db6.zip |
RDS/IB: always process recv completions
The recv refill path was leaking fragments because the recv event handler had
marked a ring element as free without freeing its frag. This was happening
because it wasn't processing receives when the conn wasn't marked up or
connecting, as can be the case if it races with rmmod.
Two observations support always processing receives in the callback.
First, buildup should only post receives, thus triggering recv event handler
calls, once it has built up all the state to handle them. Teardown should
destroy the CQ and drain the ring before tearing down the state needed to
process recvs. Both appear to be true today.
Second, this test was fundamentally racy. There is nothing to stop rmmod and
connection destruction from swooping in the moment after the conn state was
sampled but before real receive procesing starts.
Signed-off-by: Zach Brown <zach.brown@oracle.com>
Diffstat (limited to 'drivers/hid/hid-lg.c')
0 files changed, 0 insertions, 0 deletions