Jiri Slaby d546547903 vt_ioctl: fix GIO_UNIMAP regression
In commit 5ba127878722, we shuffled with the check of 'perm'. But my
brain somehow inverted the condition in 'do_unimap_ioctl' (I thought
it is ||, not &&), so GIO_UNIMAP stopped working completely.

Move the 'perm' checks back to do_unimap_ioctl and do them right again.
In fact, this reverts this part of code to the pre-5ba127878722 state.
Except 'perm' is now a bool.

Fixes: 5ba127878722 ("vt_ioctl: move perm checks level up")
Cc: stable@vger.kernel.org
Reported-by: Fabian Vogt <fvogt@suse.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Link: https://lore.kernel.org/r/20201026055419.30518-1-jslaby@suse.cz
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-10-28 13:41:17 +01:00
..
2020-10-28 13:41:17 +01:00
2019-11-13 19:01:14 +08:00
2019-04-16 15:21:34 +02:00
2020-06-27 16:21:20 +02:00
2020-08-31 07:19:25 +02:00
2020-08-31 07:19:25 +02:00
2020-08-18 13:51:18 +02:00
2020-04-27 09:33:21 +02:00
2020-08-18 13:51:18 +02:00
2020-08-18 13:51:18 +02:00
2020-08-18 13:51:18 +02:00
2020-08-18 13:51:18 +02:00
2020-08-18 13:51:18 +02:00
2020-08-18 13:51:18 +02:00
2020-08-18 13:51:18 +02:00
2019-04-16 15:21:34 +02:00