diff options
author | Bob Peterson <rpeterso@redhat.com> | 2017-09-12 08:55:23 +0000 |
---|---|---|
committer | David Teigland <teigland@redhat.com> | 2017-09-25 12:45:21 -0500 |
commit | cc661fc934a004526a714a7b804ee3f119d27093 (patch) | |
tree | 8fc52825a065297829c027d5e45830ae258cad8e /fs/xfs | |
parent | 01da24d3fbed92dc6faf60b753e6bd50cdafb646 (diff) | |
download | linux-cc661fc934a004526a714a7b804ee3f119d27093.tar.bz2 |
DLM: Fix saving of NULL callbacks
In a previous patch I noted that accept() often copies the struct
sock (sk) which overwrites the sock callbacks. However, in testing
we discovered that the dlm connection structures (con) are sometimes
deleted and recreated as connections come and go, and since they're
zeroed out by kmem_cache_zalloc, the saved callback pointers are
also initialized to zero. But with today's DLM code, the callbacks
are only saved when a socket is added.
During recovery testing, we discovered a common situation in which
the new con is initialized to zero, then a socket is added after
accept(). In this case, the sock's saved values are all NULL, but
the saved values are wiped out, due to accept(). Therefore, we
don't have a known good copy of the callbacks from which we can
restore.
Since the struct sock callbacks are always good after listen(),
this patch saves the known good values after listen(). These good
values are then used for subsequent restores.
Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Reviewed-by: Tadashi Miyauchi <miyauchi@toshiba-tops.co.jp>
Signed-off-by: David Teigland <teigland@redhat.com>
Diffstat (limited to 'fs/xfs')
0 files changed, 0 insertions, 0 deletions