|
|
@@ -99,9 +99,13 @@ int inotify_handle_event(struct fsnotify_group *group,
|
|
|
i_mark = container_of(inode_mark, struct inotify_inode_mark,
|
|
|
fsn_mark);
|
|
|
|
|
|
- /* Whoever is interested in the event, pays for the allocation. */
|
|
|
+ /*
|
|
|
+ * Whoever is interested in the event, pays for the allocation. Do not
|
|
|
+ * trigger OOM killer in the target monitoring memcg as it may have
|
|
|
+ * security repercussion.
|
|
|
+ */
|
|
|
memalloc_use_memcg(group->memcg);
|
|
|
- event = kmalloc(alloc_len, GFP_KERNEL_ACCOUNT);
|
|
|
+ event = kmalloc(alloc_len, GFP_KERNEL_ACCOUNT | __GFP_RETRY_MAYFAIL);
|
|
|
memalloc_unuse_memcg();
|
|
|
|
|
|
if (unlikely(!event)) {
|