Ronnie Sahlberg 2f94a3125b cifs: fix kref underflow in close_shroot()
Fix a bug where we used to not initialize the cached fid structure at all
in open_shroot() if the open was successful but we did not get a lease.
This would leave the structure uninitialized and later when we close the handle
we would in close_shroot() try to kref_put() an uninitialized refcount.

Fix this by always initializing this structure if the open was successful
but only do the extra get() if we got a lease.
This extra get() is only used to hold the structure until we get a lease
break from the server at which point we will kref_put() it during lease
processing.

Signed-off-by: Ronnie Sahlberg <lsahlber@redhat.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
CC: Stable <stable@vger.kernel.org>
2019-04-01 14:33:30 -05:00
..
2018-06-12 16:19:22 -07:00
2018-12-28 10:05:58 -06:00
2019-03-14 19:32:36 -05:00
2019-03-06 21:55:12 -06:00
2019-03-04 20:05:34 -06:00
2018-12-28 10:05:58 -06:00
2018-08-07 14:15:41 -05:00
2019-03-14 19:32:36 -05:00
2018-07-05 13:48:24 -05:00
2019-01-24 09:37:33 -06:00
2013-09-08 14:54:24 -05:00