ploop: Disable ioctl(PLOOP_IOC_BALLOON)

Submitted by Kirill Tkhai on April 9, 2019, 4:43 p.m.

Details

Message ID 155482821459.17578.15887512236297145380.stgit@localhost.localdomain
State New
Series "ploop: Disable ioctl(PLOOP_IOC_BALLOON)"
Headers show

Commit Message

Kirill Tkhai April 9, 2019, 4:43 p.m.
This ioctl enters in discard maintaince mode
in hidden way. The discard logic is rewritten,
so we disable it.

Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
---
 drivers/block/ploop/dev.c |    2 ++
 1 file changed, 2 insertions(+)

Patch hide | download patch | download mbox

diff --git a/drivers/block/ploop/dev.c b/drivers/block/ploop/dev.c
index 815c74438dd6..75e00b5dc864 100644
--- a/drivers/block/ploop/dev.c
+++ b/drivers/block/ploop/dev.c
@@ -4514,6 +4514,8 @@  static int ploop_balloon_ioc(struct ploop_device *plo, unsigned long arg)
 	struct ploop_balloon_ctl ctl;
 	struct ploop_delta *delta = ploop_top_delta(plo);
 
+	return -EINVAL;
+
 	if (list_empty(&plo->map.delta_list))
 		return -ENOENT;
 

Comments

Kirill Tkhai April 10, 2019, 8:49 a.m.
Please, ignore this, I'll send another patch.

On 09.04.2019 19:43, Kirill Tkhai wrote:
> This ioctl enters in discard maintaince mode
> in hidden way. The discard logic is rewritten,
> so we disable it.
> 
> Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
> ---
>  drivers/block/ploop/dev.c |    2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/block/ploop/dev.c b/drivers/block/ploop/dev.c
> index 815c74438dd6..75e00b5dc864 100644
> --- a/drivers/block/ploop/dev.c
> +++ b/drivers/block/ploop/dev.c
> @@ -4514,6 +4514,8 @@ static int ploop_balloon_ioc(struct ploop_device *plo, unsigned long arg)
>  	struct ploop_balloon_ctl ctl;
>  	struct ploop_delta *delta = ploop_top_delta(plo);
>  
> +	return -EINVAL;
> +
>  	if (list_empty(&plo->map.delta_list))
>  		return -ENOENT;
>  
>