]> git.baikalelectronics.ru Git - kernel.git/commit
afs: Fix vlserver record corruption
authorDavid Howells <dhowells@redhat.com>
Thu, 20 Jun 2019 15:49:35 +0000 (16:49 +0100)
committerDavid Howells <dhowells@redhat.com>
Thu, 20 Jun 2019 15:49:35 +0000 (16:49 +0100)
commit41f7a97ff571b53ebf0884c6682b2d98bf5fe07e
tree7d9ec9c2d44c150862ab74db4475dd96ed8ce823
parent9b41da28c43e11654d7784a23f386840fd172292
afs: Fix vlserver record corruption

Because I made the afs_call struct share pointers to an afs_server object
and an afs_vlserver object to save space, afs_put_call() calls
afs_put_server() on afs_vlserver object (which is only meant for the
afs_server object) because it sees that call->server isn't NULL.

This means that the afs_vlserver object gets unpredictably and randomly
modified, depending on what config options are set (such as lockdep).

Fix this by getting rid of the union and having two non-overlapping
pointers in the afs_call struct.

Fixes: d86297d6b4cf ("afs: Get rid of afs_call::reply[]")
Signed-off-by: David Howells <dhowells@redhat.com>
fs/afs/internal.h