OSDN Git Service

lockd: fix decoding of TEST results
authorJ. Bruce Fields <bfields@redhat.com>
Mon, 26 Nov 2018 16:36:52 +0000 (11:36 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 13 Dec 2019 07:51:59 +0000 (08:51 +0100)
commita2b7010f76ea67963a098095318a9552297478e6
tree3d02a65abcc675563c96a32cd8f1bad2fbc064e8
parent5f7d707b15885cb039477d91867e653b243f7c2f
lockd: fix decoding of TEST results

[ Upstream commit b8db159239b3f51e2b909859935cc25cb3ff3eed ]

We fail to advance the read pointer when reading the stat.oh field that
identifies the lock-holder in a TEST result.

This turns out not to matter if the server is knfsd, which always
returns a zero-length field.  But other servers (Ganesha is an example)
may not do this.  The result is bad values in fcntl F_GETLK results.

Fix this.

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/lockd/clnt4xdr.c
fs/lockd/clntxdr.c