+ fanotify-remove-useless-bypass_perm-check.patch added to -mm tree
Subsystems (2)
Subject: + fanotify-remove-useless-bypass_perm-check.patch added to -mm tree
To: [email protected],[email protected]
From: [email protected]
Date: Thu, 30 Jan 2014 14:01:30 -0800
The patch titled
Subject: fanotify: remove useless bypass_perm check
has been added to the -mm tree. Its filename is
fanotify-remove-useless-bypass_perm-check.patch
This patch should soon appear at
http://ozlabs.org/~akpm/mmots/broken-out/fanotify-remove-useless-bypass_perm-check.patch
and later at
http://ozlabs.org/~akpm/mmotm/broken-out/fanotify-remove-useless-bypass_perm-check.patch
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/SubmitChecklist when testing your code ***
The -mm tree is included into linux-next and is updated there every 3-4 working days
------------------------------------------------------
From: Jan Kara <[email protected]>
Subject: fanotify: remove useless bypass_perm check
prepare_for_access_response() checks whether group->fanotify_data.bypass_perm is set. However this test can never be true because prepare_for_access_response() is called only from fanotify_read() which means fanotify group is alive with an active fd while bypass_perm is set from fanotify_release() when all file descriptors pointing to the group are closed and the group is going away.
---
fs/notify/fanotify/fanotify_user.c | 8 -------- 1 file changed, 8 deletions(-)
fs/notify/fanotify/fanotify_user.c renamed from fs/notify/fanotify/fanotify_user.c~fanotify-remove-useless-bypass_perm-check +0 -8
@@ -211,14 +211,6 @@ static int prepare_for_access_response(s re->fd = fd;mutex_lock (&group->fanotify_data.access_mutex); - -if (atomic_read (&group->fanotify_data.bypass_perm)) { -mutex_unlock (&group->fanotify_data.access_mutex); -kmem_cache_free (fanotify_response_event_cache, re); -FANOTIFY_E (event)->response =FAN_ALLOW ; -return 0 ; - } -list_add_tail (&re->list, &group->fanotify_data.access_list);mutex_unlock (&group->fanotify_data.access_mutex);
_
Patches currently in -mm which might be from [email protected] are
origin.patch
fanotify-remove-useless-bypass_perm-check.patch fanotify-use-fanotify-event-structure-for-permission-response-processing.patch fanotify-remove-useless-test-from-event-initialization.patch fanotify-convert-access_mutex-to-spinlock.patch fanotify-reorganize-loop-in-fanotify_read.patch fanotify-move-unrelated-handling-from-copy_event_to_user.patch linux-next.patch kernel-use-lockless-list-for-smp_call_function_single.patch mm-add-strictlimit-knob-v2.patch