All of lore.kernel.org
 help / color / mirror / Atom feed
From: Heinrich Schuchardt <xypron.glpk@gmx.de>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Jan Kara <jack@suse.cz>, Eric Paris <eparis@redhat.com>,
	linux-kernel@vger.kernel.org,
	Michael Kerrisk <mtk.manpages@gmail.com>
Subject: Fwd: Re: [PATCH 1/1] fanotify: for FAN_MARK_FLUSH check flags
Date: Thu, 01 May 2014 17:53:32 +0200	[thread overview]
Message-ID: <53626DFC.6050200@gmx.de> (raw)
In-Reply-To: <20140424100300.GL17824@quack.suse.cz>

Hello Andrew,

the patch below was
Acked-by: Michael Kerrisk <mtk.manpages@gmail.com>
https://lkml.org/lkml/2014/4/24/23
Acked-by: Jan Kara <jack@suse.cz>
https://lkml.org/lkml/2014/4/24/1048

Please, consider it for inclusion in the mm tree.

Best regards

Heinrich Schuchardt


On 24.04.2014 12:03, Jan Kara wrote:
> On Wed 23-04-14 23:55:51, Heinrich Schuchardt wrote:
>> If fanotify_mark is called with illegal value of arguments flags and marks
>> it usually returns EINVAL.
>>
>> When fanotify_mark is called with FAN_MARK_FLUSH the argument flags is not
>> checked for irrelevant flags like FAN_MARK_IGNORED_MASK.
>>
>> The patch removes this inconsistency.
>>
>> If an irrelevant flag is set error EINVAL is returned.
>    OK, as Michael I think this shouldn't cause real userspace breakage and
> it's better to have the flags checked. So feel free to add:
> Acked-by: Jan Kara <jack@suse.cz>
>
> 							Honza
>
>>
>> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
>> ---
>>   fs/notify/fanotify/fanotify_user.c | 3 +++
>>   1 file changed, 3 insertions(+)
>>
>> diff --git a/fs/notify/fanotify/fanotify_user.c b/fs/notify/fanotify/fanotify_user.c
>> index 287a22c..8bba549 100644
>> --- a/fs/notify/fanotify/fanotify_user.c
>> +++ b/fs/notify/fanotify/fanotify_user.c
>> @@ -819,7 +819,10 @@ SYSCALL_DEFINE5(fanotify_mark, int, fanotify_fd, unsigned int, flags,
>>   	case FAN_MARK_REMOVE:
>>   		if (!mask)
>>   			return -EINVAL;
>> +		break;
>>   	case FAN_MARK_FLUSH:
>> +		if (flags & ~(FAN_MARK_MOUNT | FAN_MARK_FLUSH))
>> +			return -EINVAL;
>>   		break;
>>   	default:
>>   		return -EINVAL;
>> --
>> 1.9.2
>>


      reply	other threads:[~2014-05-01 15:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-23 21:55 [PATCH 1/1] fanotify: for FAN_MARK_FLUSH check flags Heinrich Schuchardt
2014-04-24  5:09 ` Michael Kerrisk (man-pages)
2014-04-24 10:03 ` Jan Kara
2014-05-01 15:53   ` Heinrich Schuchardt [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53626DFC.6050200@gmx.de \
    --to=xypron.glpk@gmx.de \
    --cc=akpm@linux-foundation.org \
    --cc=eparis@redhat.com \
    --cc=jack@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mtk.manpages@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.