J. Bruce Fields f961e3f2ac nfsd: encoders mustn't use unitialized values in error cases
In error cases, lgp->lg_layout_type may be out of bounds; so we
shouldn't be using it until after the check of nfserr.

This was seen to crash nfsd threads when the server receives a LAYOUTGET
request with a large layout type.

GETDEVICEINFO has the same problem.

Reported-by: Ari Kauppi <Ari.Kauppi@synopsys.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Cc: stable@vger.kernel.org
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
2017-05-10 14:25:19 -04:00
..
2014-07-08 17:14:27 -04:00
2016-10-07 18:46:30 -07:00
2017-02-27 18:43:46 -08:00
2016-08-04 19:59:06 -04:00
2016-03-18 11:42:53 -04:00
2014-08-17 12:00:12 -04:00
2017-02-22 11:44:32 -08:00
2017-02-27 18:43:47 -08:00
2017-01-31 12:31:54 -05:00
2016-01-22 18:04:28 -05:00
2016-05-29 19:08:00 -04:00
2016-01-14 17:32:51 -05:00
2016-10-07 14:54:25 -04:00