From patchwork Mon May 11 17:58:58 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabian Frederick X-Patchwork-Id: 11541391 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 92A87913 for ; Mon, 11 May 2020 17:59:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 826CE20720 for ; Mon, 11 May 2020 17:59:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730979AbgEKR7G (ORCPT ); Mon, 11 May 2020 13:59:06 -0400 Received: from mailrelay107.isp.belgacom.be ([195.238.20.134]:58266 "EHLO mailrelay107.isp.belgacom.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727051AbgEKR7G (ORCPT ); Mon, 11 May 2020 13:59:06 -0400 IronPort-SDR: WCgrKXePoExsesfAu6YdoHKC9RbY4MKgwj8fC2nDoWaUwsOk17Q9vg4b8F9OfPJdVISiBiO2qQ Cn4Gr6+IWHHE5S6ZQROylHEspsu3bOzsuddDj9sU7QT5woyv1p87bdBDBedB9FDu+okegTgT4S xHeIwqCILZpAbsgKtOVgb5ou8Wwxy+EbMYdoM6vmXbDGdGAAKsk9Tsnf67Vqd3Al80AUXKqygy LQnTMZ3ct9xibLcdOAY5/wShZEjQ0QGXqLUanF3iOrG7o/2eM6LUngx4+KBhPg3j7SAGsYvDc8 gEc= X-Belgacom-Dynamic: yes IronPort-PHdr: 9a23:Qdu0sBayuqsHqjPNTIGL/hr/LSx+4OfEezUN459isYplN5qZrsiybnLW6fgltlLVR4KTs6sC17OL9fG4EjVZu96oizMrSNR0TRgLiMEbzUQLIfWuLgnFFsPsdDEwB89YVVVorDmROElRH9viNRWJ+iXhpTEdFQ/iOgVrO+/7BpDdj9it1+C15pb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H5WUqVcN6DRn69QcSgDC13RN9nkIxGWFp0B9j31kOL5CGtGbJAz7E= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2BMBwACkrle/xCltltmhE0tgWQSLI0lhXqMGJFYCwEBAQEBAQEBATQBAgQBAYREgg0nOBMCAwEBAQMCBQEBBgEBAQEBAQQEAWwEAQEHCgIBhE4hAQMBAQUKAQsIMII7IoNCCwEjI09wEoJbS4JYKbBBM4VRg1aBQIE4h12FAYFBP4RfikIEmBCaW4JUgnGVKwwdnTotj3CfOyKBVk0gGDuCaVAYDYlElUZCMDcCBggBAQMJVwEiAY4IAQE X-IPAS-Result: A2BMBwACkrle/xCltltmhE0tgWQSLI0lhXqMGJFYCwEBAQEBAQEBATQBAgQBAYREgg0nOBMCAwEBAQMCBQEBBgEBAQEBAQQEAWwEAQEHCgIBhE4hAQMBAQUKAQsIMII7IoNCCwEjI09wEoJbS4JYKbBBM4VRg1aBQIE4h12FAYFBP4RfikIEmBCaW4JUgnGVKwwdnTotj3CfOyKBVk0gGDuCaVAYDYlElUZCMDcCBggBAQMJVwEiAY4IAQE Received: from 16.165-182-91.adsl-dyn.isp.belgacom.be (HELO biggussolus.home) ([91.182.165.16]) by relay.skynet.be with ESMTP; 11 May 2020 19:59:04 +0200 From: Fabian Frederick To: jack@suse.cz, amir73il@gmail.com Cc: linux-fsdevel@vger.kernel.org, Fabian Frederick Subject: [PATCH 1/9 linux-next] fanotify: prefix should_merge() Date: Mon, 11 May 2020 19:58:58 +0200 Message-Id: <20200511175858.214835-1-fabf@skynet.be> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org prefix function with fanotify_ like others Signed-off-by: Fabian Frederick --- fs/notify/fanotify/fanotify.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/notify/fanotify/fanotify.c b/fs/notify/fanotify/fanotify.c index 5435a40f82be..95480d3dcff7 100644 --- a/fs/notify/fanotify/fanotify.c +++ b/fs/notify/fanotify/fanotify.c @@ -70,7 +70,7 @@ static bool fanotify_name_event_equal(struct fanotify_name_event *fne1, return !memcmp(fne1->name, fne2->name, fne1->name_len); } -static bool should_merge(struct fsnotify_event *old_fsn, +static bool fanotify_should_merge(struct fsnotify_event *old_fsn, struct fsnotify_event *new_fsn) { struct fanotify_event *old, *new; @@ -129,7 +129,7 @@ static int fanotify_merge(struct list_head *list, struct fsnotify_event *event) return 0; list_for_each_entry_reverse(test_event, list, list) { - if (should_merge(test_event, event)) { + if (fanotify_should_merge(test_event, event)) { FANOTIFY_E(test_event)->mask |= new->mask; return 1; } From patchwork Mon May 11 17:59:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabian Frederick X-Patchwork-Id: 11541393 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id EEDA3186E for ; Mon, 11 May 2020 17:59:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DD113206B9 for ; Mon, 11 May 2020 17:59:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729135AbgEKR7v (ORCPT ); Mon, 11 May 2020 13:59:51 -0400 Received: from mailrelay107.isp.belgacom.be ([195.238.20.134]:58343 "EHLO mailrelay107.isp.belgacom.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727051AbgEKR7v (ORCPT ); Mon, 11 May 2020 13:59:51 -0400 IronPort-SDR: 31ird6Ax8XZ7HyF9kPh/xpx0zjEl95eD76PWytPRtKINJA8whTVyfEQ0S8Af5wIltTm82yh6WL Y0oOrNo7XHwhDIHCnCsaGatBqZMwNhDJQBSCMGay8hR+c+FQgK7ReB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Fdwybj4TzIF7BPuj0De2jjFS0jDdr2/fGM6XjAprXMnfDk6zsfa1g605H1gU/18xQ5pNMALEbPP3zQlPxtMDfDhIhKQO0xufnCM9/244QWGKPBrSUMKzXsVCS5+IvJ/OAa5MSuDb4M/Il/eLhjWclmV8BeqmkxZ8XaHG+HvR7LESVeHTsgswcHmgUoAoxUujqhUacUT5ceXmyRbgw5jIlB4K8C4fMWIStjKaG3CehEZ1cfnpGBUyUEXf0a4WEXO8BaCyILcB6nDwJTqOhS4wh1BGoqgD616BrIfHK9X5QiZW21tF+5MXIiAo/szdmS4yU1mCXEDp1mksHQjY32OZ0pkku5E2E1P1WivZZHNobyelEXgogNJXfh7h0Atr8chnCb9GEVBCsT4P1UnkKUtstzopWMA5GENK4g0Wb0g== X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2AaBgACkrle/xCltltmglCCKoFkEiyNJYV6jBiKMoUrgXsLAQEBAQEBAQEBNAECBAEBhESCDSc2Bw4CAwEBAQMCBQEBBgEBAQEBAQQEAWwEAQEHCgIBhE4hAQMBAQUKAUOCOyKDQgsBIyNPcBKDJoJYKbBBM4VRg1aBQIE4h12FAYFBP4ERg06KQgSya4JUgnGVKwwdnTotj3CfKwIwgVZNIBiDJFAYDZBJAxeOJ0IwNwIGCAEBAwlXASIBjggBAQ X-IPAS-Result: A2AaBgACkrle/xCltltmglCCKoFkEiyNJYV6jBiKMoUrgXsLAQEBAQEBAQEBNAECBAEBhESCDSc2Bw4CAwEBAQMCBQEBBgEBAQEBAQQEAWwEAQEHCgIBhE4hAQMBAQUKAUOCOyKDQgsBIyNPcBKDJoJYKbBBM4VRg1aBQIE4h12FAYFBP4ERg06KQgSya4JUgnGVKwwdnTotj3CfKwIwgVZNIBiDJFAYDZBJAxeOJ0IwNwIGCAEBAwlXASIBjggBAQ Received: from 16.165-182-91.adsl-dyn.isp.belgacom.be (HELO biggussolus.home) ([91.182.165.16]) by relay.skynet.be with ESMTP; 11 May 2020 19:59:49 +0200 From: Fabian Frederick To: jack@suse.cz, amir73il@gmail.com Cc: linux-fsdevel@vger.kernel.org, Fabian Frederick Subject: [PATCH 2/9 linux-next] fanotify: fanotify_encode_fid(): variable init Date: Mon, 11 May 2020 19:59:34 +0200 Message-Id: <20200511175934.214881-1-fabf@skynet.be> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org Initialize variables at declaration. Signed-off-by: Fabian Frederick --- fs/notify/fanotify/fanotify.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/fs/notify/fanotify/fanotify.c b/fs/notify/fanotify/fanotify.c index 95480d3dcff7..5c6f29d2d8f9 100644 --- a/fs/notify/fanotify/fanotify.c +++ b/fs/notify/fanotify/fanotify.c @@ -277,16 +277,15 @@ static u32 fanotify_group_event_mask(struct fsnotify_group *group, static void fanotify_encode_fh(struct fanotify_fh *fh, struct inode *inode, gfp_t gfp) { - int dwords, type, bytes = 0; + int dwords = 0, bytes = 0; + int err = -ENOENT; + int type; char *ext_buf = NULL; void *buf = fh->buf; - int err; if (!inode) goto out; - dwords = 0; - err = -ENOENT; type = exportfs_encode_inode_fh(inode, NULL, &dwords, NULL); if (!dwords) goto out_err; From patchwork Mon May 11 18:00:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabian Frederick X-Patchwork-Id: 11541395 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4B646912 for ; Mon, 11 May 2020 18:00:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3CC3820720 for ; Mon, 11 May 2020 18:00:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730739AbgEKSAe (ORCPT ); Mon, 11 May 2020 14:00:34 -0400 Received: from mailrelay107.isp.belgacom.be ([195.238.20.134]:58416 "EHLO mailrelay107.isp.belgacom.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727051AbgEKSAe (ORCPT ); Mon, 11 May 2020 14:00:34 -0400 IronPort-SDR: TGBs/NcPgxU5YwHEhMCt1CkESV440BpfUu/yDaTbJBVBnaS32OzdKLaJ1C/bNvN2a5bT5brIUb 9+KLZKEJTpDZju8S6dZczdPSitPqhBv9KamLCcNURRKI5V1vogp5aixg4MOIHuZ1FpY6vNkK/b P7xGkqC1rye8knMccrvWUUP8c29WyE31IaEl4pSm32IURCld6LkB49vD8eCNlVM/ebPamNWzaF +LZNdz5gIeaRXaUBJwkeHp0y6IzgHyQE6zivWP16koTOak6TLW3LXGPQz3INyd4nQ/kEtSXQ4r 3hI= X-Belgacom-Dynamic: yes IronPort-PHdr: 9a23:OLdaaBMJrxitgW5zEX4l6mtUPXoX/o7sNwtQ0KIMzox0I/jzrarrMEGX3/hxlliBBdydt6sZzbuO+Pm5AyQp2tWoiDg6aptCVhsI2409vjcLJ4q7M3D9N+PgdCcgHc5PBxdP9nC/NlVJSo6lPwWB6nK94iQPFRrhKAF7Ovr6GpLIj8Swyuu+54Dfbx9HiTagYb5+NhG7oRneusULnIduNLs6xwfUrHdPZ+lY335jK0iJnxb76Mew/Zpj/DpVtvk86cNOUrj0crohQ7BAAzsoL2465MvwtRneVgSP/WcTUn8XkhVTHQfI6gzxU4rrvSv7sup93zSaPdHzQLspVzmu87tnRRn1gyoBKjU38nzYitZogaxbvhyvuhJxzY3Tbo6aO/RzZb/RcNAASGZdRMtdSzBND4WhZIUPFeoBOuNYopH9qVQUthS+BBOjBOXywTFInH/5w7A13Po7EQHHwAMgHM8FvXParNrvL6gSX/u4zLLLzTTDafNZxyv95JLTfR8/uPyBW697fsXNx0c1DQzFkkmQppL/PzOTzukDvWuW4u5gW++ui2M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WAsBAQEBAQEBAQE0AQIEAQGERIINJzcGDgIDAQEBAwIFAQEGAQEBAQEBBAQBbAQBAQcKAgGETiEBAwEBBQoBQ4I7IoNCCwEjI09wEoMmglgpsEEzhVGDVoFAgTiHXYUBgUE/hF+KQgSya4JUgnGVKwwdnTqQHZ86I4FWTSAYgyRQGA2fCkIwNwIGCAEBAwlXASIBjggBAQ Received: from 16.165-182-91.adsl-dyn.isp.belgacom.be (HELO biggussolus.home) ([91.182.165.16]) by relay.skynet.be with ESMTP; 11 May 2020 20:00:32 +0200 From: Fabian Frederick To: jack@suse.cz, amir73il@gmail.com Cc: linux-fsdevel@vger.kernel.org, Fabian Frederick Subject: [PATCH 3/9 linux-next] notify: explicit shutdown initialization Date: Mon, 11 May 2020 20:00:25 +0200 Message-Id: <20200511180025.214952-1-fabf@skynet.be> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org kzalloc should already do it but explicitly initialize group shutdown variable to false. Signed-off-by: Fabian Frederick --- fs/notify/group.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/notify/group.c b/fs/notify/group.c index 133f723aca07..f2cba2265061 100644 --- a/fs/notify/group.c +++ b/fs/notify/group.c @@ -130,6 +130,7 @@ struct fsnotify_group *fsnotify_alloc_group(const struct fsnotify_ops *ops) INIT_LIST_HEAD(&group->notification_list); init_waitqueue_head(&group->notification_waitq); group->max_events = UINT_MAX; + group->shutdown = false; mutex_init(&group->mark_mutex); INIT_LIST_HEAD(&group->marks_list); From patchwork Mon May 11 18:00:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabian Frederick X-Patchwork-Id: 11541397 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1B2F2186E for ; Mon, 11 May 2020 18:01:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0BD94206B9 for ; Mon, 11 May 2020 18:01:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728711AbgEKSBF (ORCPT ); Mon, 11 May 2020 14:01:05 -0400 Received: from mailrelay107.isp.belgacom.be ([195.238.20.134]:58467 "EHLO mailrelay107.isp.belgacom.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726310AbgEKSBF (ORCPT ); Mon, 11 May 2020 14:01:05 -0400 IronPort-SDR: aUaxfGE8BlacwG/G0pIlSUrEd+suneAgK2yiBLlT0mhN7NN3z4lsrO3u8XAxDcRBGVcDm9tC58 /E36Fb4sCdcmJ9Z5T6WgXhGWj1fHTFYwoTXpLN6xqSAGC+SX91n3VoHrnYvNyHMRLQ12xCacjZ HOTDNqse1w11U5nYn/A3NwwYbBhnxEo1qWhAhDgetqEyNruvjWbIXcmMyoydp3x95OjI0kwAJ0 kTzYlhOPPlpZBeYA+FO30Hurb/QJcXsHekrQkADpB1dRwW2RprEhyIwwIwQHZFqrYR591Ihyn5 frQ= X-Belgacom-Dynamic: yes IronPort-PHdr: 9a23:oW86ABKzpNanoYpLoNmcpTZWNBhigK39O0sv0rFitYgfLvTxwZ3uMQTl6Ol3ixeRBMOHsq8C2rKd6vm6EUU7or+5+EgYd5JNUxJXwe43pCcHRPC/NEvgMfTxZDY7FskRHHVs/nW8LFQHUJ2mPw6arXK99yMdFQviPgRpOOv1BpTSj8Oq3Oyu5pHfeQpFiCe9bL9oKBi6sQrdutQLjYd8N6081gbHrnxUdupM2GhmP0iTnxHy5sex+J5s7SFdsO8/+sBDTKv3Yb02QaRXAzo6PW814tbrtQTYQguU+nQcSGQWnQFWDAXD8Rr3Q43+sir+tup6xSmaIcj7Rq06VDi+86tmTgLjhSEaPDA77W7XkNR9gqJFrhy8qRJxwIn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EBAwEBBQoBQ4I7IoNCCwEjI09wEoMmglgpsEEzhVGDVoFAgTiHXYUBgUE/hF+KQgSya4JUgnGVKwwdgkuab5AdnzsigVZNIBiDJFAYDZBMF44nQjA3AgYIAQEDCVcBIgGOCAEB X-IPAS-Result: A2BKBwACkrle/xCltltmhHqBZBIsjSWFeowYkVgLAQEBAQEBAQEBNAECBAEBhESCDSc4EwIDAQEBAwIFAQEGAQEBAQEBBAQBbAQBAQcKAgGETiEBAwEBBQoBQ4I7IoNCCwEjI09wEoMmglgpsEEzhVGDVoFAgTiHXYUBgUE/hF+KQgSya4JUgnGVKwwdgkuab5AdnzsigVZNIBiDJFAYDZBMF44nQjA3AgYIAQEDCVcBIgGOCAEB Received: from 16.165-182-91.adsl-dyn.isp.belgacom.be (HELO biggussolus.home) ([91.182.165.16]) by relay.skynet.be with ESMTP; 11 May 2020 20:01:03 +0200 From: Fabian Frederick To: jack@suse.cz, amir73il@gmail.com Cc: linux-fsdevel@vger.kernel.org, Fabian Frederick Subject: [PATCH 4/9 linux-next] notify: add mutex destroy Date: Mon, 11 May 2020 20:00:59 +0200 Message-Id: <20200511180059.215002-1-fabf@skynet.be> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org destroy mutex before group kfree Signed-off-by: Fabian Frederick --- fs/notify/group.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/notify/group.c b/fs/notify/group.c index f2cba2265061..0a2dc03d13eb 100644 --- a/fs/notify/group.c +++ b/fs/notify/group.c @@ -25,6 +25,7 @@ static void fsnotify_final_destroy_group(struct fsnotify_group *group) group->ops->free_group_priv(group); mem_cgroup_put(group->memcg); + mutex_destroy(&group->mark_mutex); kfree(group); } From patchwork Mon May 11 18:01:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabian Frederick X-Patchwork-Id: 11541399 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B2339912 for ; Mon, 11 May 2020 18:01:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A2A3A20720 for ; Mon, 11 May 2020 18:01:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731006AbgEKSBb (ORCPT ); Mon, 11 May 2020 14:01:31 -0400 Received: from mailrelay107.isp.belgacom.be ([195.238.20.134]:58510 "EHLO mailrelay107.isp.belgacom.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726310AbgEKSBa (ORCPT ); Mon, 11 May 2020 14:01:30 -0400 IronPort-SDR: ivXJ1JMA1nfFgULfRsKz2UDhjNCU3uyqkaizu6j/Dud6U44KbPgH5dItYcuuVW9nQi9ga843Ds /vM3PEetQnibyBjQxWlZt/t3U7mWKIPF6p2+XZ0V3h/OaO6SVxoiXunut5rSpqv5Y5JVXT0Efn 8vkyL16pY+RsO0+k16Ky3WRwKbCM8fquoXSOztSqpr1VsWdBGdpEf6CTP7rxz/BhADvCX6YjGK qO2STqSH+jrNHTag2cfZ0xNl/D8p6KYu1BnaIEK3e3nk8KbIsDqdSgKMeIvVeL9EX7K2SHbOeJ xeM= X-Belgacom-Dynamic: yes IronPort-PHdr: 9a23:rdYc6hKeW7AbVUPih9mcpTZWNBhigK39O0sv0rFitYgfLvTxwZ3uMQTl6Ol3ixeRBMOHsq8C2rKd6vm6EUU7or+5+EgYd5JNUxJXwe43pCcHRPC/NEvgMfTxZDY7FskRHHVs/nW8LFQHUJ2mPw6arXK99yMdFQviPgRpOOv1BpTSj8Oq3Oyu5pHfeQpFiCe9bL9oKBi6sQrdutQLjYd8N6081gbHrnxUdupM2GhmP0iTnxHy5sex+J5s7SFdsO8/+sBDTKv3Yb02QaR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2ChDAACkrle/xCltltmHQEBPAEFBQECAQkBgV6CKIFkEiyNJYV6jBiKMoU/gWcLAQEBAQEBAQEBNAECBAEBhESCDSc4EwIDAQEBAwIFAQEGAQEBAQEBBAQBbAQBAQcKAgGETiEBAwEBBQoBQ4I7IoNNASMjT3ASgyaCWCmwdIVRg1aBQIE4AYdchQGBQT+EX4QVH4YOBLJrglSCcZUrDB2dOi2PcJ87IoFWTSAYgyRQGA2fCkIwNwIGCAEBAwlXASIBi0OCRQEB X-IPAS-Result: A2ChDAACkrle/xCltltmHQEBPAEFBQECAQkBgV6CKIFkEiyNJYV6jBiKMoU/gWcLAQEBAQEBAQEBNAECBAEBhESCDSc4EwIDAQEBAwIFAQEGAQEBAQEBBAQBbAQBAQcKAgGETiEBAwEBBQoBQ4I7IoNNASMjT3ASgyaCWCmwdIVRg1aBQIE4AYdchQGBQT+EX4QVH4YOBLJrglSCcZUrDB2dOi2PcJ87IoFWTSAYgyRQGA2fCkIwNwIGCAEBAwlXASIBi0OCRQEB Received: from 16.165-182-91.adsl-dyn.isp.belgacom.be (HELO biggussolus.home) ([91.182.165.16]) by relay.skynet.be with ESMTP; 11 May 2020 20:01:29 +0200 From: Fabian Frederick To: jack@suse.cz, amir73il@gmail.com Cc: linux-fsdevel@vger.kernel.org, Fabian Frederick Subject: [PATCH 5/9 linux-next] fanotify: remove reference to fill_event_metadata() Date: Mon, 11 May 2020 20:01:25 +0200 Message-Id: <20200511180125.215048-1-fabf@skynet.be> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org fill_event_metadata() was removed in commit bb2f7b4542c7 ("fanotify: open code fill_event_metadata()") Signed-off-by: Fabian Frederick --- fs/notify/fanotify/fanotify_user.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/notify/fanotify/fanotify_user.c b/fs/notify/fanotify/fanotify_user.c index 42cb794c62ac..02a314acc757 100644 --- a/fs/notify/fanotify/fanotify_user.c +++ b/fs/notify/fanotify/fanotify_user.c @@ -328,7 +328,7 @@ static ssize_t copy_event_to_user(struct fsnotify_group *group, ret = -EFAULT; /* * Sanity check copy size in case get_one_event() and - * fill_event_metadata() event_len sizes ever get out of sync. + * event_len sizes ever get out of sync. */ if (WARN_ON_ONCE(metadata.event_len > count)) goto out_close_fd; From patchwork Mon May 11 18:01:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabian Frederick X-Patchwork-Id: 11541401 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5BD7D912 for ; Mon, 11 May 2020 18:02:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4C23720736 for ; Mon, 11 May 2020 18:02:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729523AbgEKSCC (ORCPT ); Mon, 11 May 2020 14:02:02 -0400 Received: from mailrelay107.isp.belgacom.be ([195.238.20.134]:58553 "EHLO mailrelay107.isp.belgacom.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729305AbgEKSCC (ORCPT ); Mon, 11 May 2020 14:02:02 -0400 IronPort-SDR: AzlDzc36Dtnhx6eGgeHaxDmnAyiE2rj/RHcNwXjd4v6PKTlZ3wbdMYfHapkwF/94ZoJXtUgO3y oIFRnYJRSqyR5vTRvSo6WduU5evi2vrQL65szH4N9gP1j305Zyq5d6mG0mDueX3c8Z4617gQ4v d8KaEifS5ZajQSEhSuH3kbbuFZHwzWVjpBH6OBJViZadgt3yA/u7m55/3ugfitWXBdwqYRKXsL YtMI/IxPjDucEpldFBtpiBrNCfQlBHlrJMlcqdu8h21QeqelGI4nl7ntZT6GN7BLsP0WQr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mI0SfYXrxjdYNCGkKvhEjQ+P0ll2NTzpTam2sX6Iz+D47EpiqDYTdSYC3hryOwiO7EodRZmBcBVCGCW3oeJmcW/cQdCKSJddskjIeWre6RY8szgqutAz6yrphMOXU5jcUuon924s92+qGlxg59hRvEt+QlWqfCyl9m2ISGGQ32IhwpEV8zhGI1q0rreZfEIl97vlIWwFyG4TRw+FgCtvxElbPd92HYE2lU9OrHXc7Q4RikJc1f09hFoD63Vj41C2wDupNmg== X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2COBgACkrle/xCltltmglCCKoFkEiyNJYV6jBiRWAsBAQEBAQEBAQE0AQIEAQGERIINJzcGDgIDAQEBAwIFAQEGAQEBAQEBBAQBbAQBAQcKAgGETiEBAwEBBQoBQ4I7IoNNASMjT3ASgyaCWCmwdIVRg1aBQIE4h12FAYFBP4RfhBWGLQSya4JUgnGVKwwdgkuaby2PcJ86I4FWTSAYgyRQGA2fCkIwNwIGCAEBAwlXASIBi0OCRQEB X-IPAS-Result: A2COBgACkrle/xCltltmglCCKoFkEiyNJYV6jBiRWAsBAQEBAQEBAQE0AQIEAQGERIINJzcGDgIDAQEBAwIFAQEGAQEBAQEBBAQBbAQBAQcKAgGETiEBAwEBBQoBQ4I7IoNNASMjT3ASgyaCWCmwdIVRg1aBQIE4h12FAYFBP4RfhBWGLQSya4JUgnGVKwwdgkuaby2PcJ86I4FWTSAYgyRQGA2fCkIwNwIGCAEBAwlXASIBi0OCRQEB Received: from 16.165-182-91.adsl-dyn.isp.belgacom.be (HELO biggussolus.home) ([91.182.165.16]) by relay.skynet.be with ESMTP; 11 May 2020 20:02:00 +0200 From: Fabian Frederick To: jack@suse.cz, amir73il@gmail.com Cc: linux-fsdevel@vger.kernel.org, Fabian Frederick Subject: [PATCH 6/9 linux-next] fsnotify/fdinfo: remove proc_fs.h inclusion Date: Mon, 11 May 2020 20:01:55 +0200 Message-Id: <20200511180155.215094-1-fabf@skynet.be> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org proc_fs.h was already included in fdinfo.h Signed-off-by: Fabian Frederick --- fs/notify/fdinfo.c | 1 - 1 file changed, 1 deletion(-) diff --git a/fs/notify/fdinfo.c b/fs/notify/fdinfo.c index ef83f4020554..f0d6b54be412 100644 --- a/fs/notify/fdinfo.c +++ b/fs/notify/fdinfo.c @@ -11,7 +11,6 @@ #include #include #include -#include #include #include "inotify/inotify.h" From patchwork Mon May 11 18:02:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabian Frederick X-Patchwork-Id: 11541403 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 950B1913 for ; Mon, 11 May 2020 18:02:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 81C1920720 for ; Mon, 11 May 2020 18:02:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729635AbgEKSCf (ORCPT ); Mon, 11 May 2020 14:02:35 -0400 Received: from mailrelay107.isp.belgacom.be ([195.238.20.134]:58610 "EHLO mailrelay107.isp.belgacom.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726891AbgEKSCe (ORCPT ); Mon, 11 May 2020 14:02:34 -0400 IronPort-SDR: rxp6Kn8uyDJ/BhICncl+TvFI3dOyE/RusIYuDHVw45Pa9xbWxGKlPoaqjIIVMeJgNy+3djqyyb MPSOFUbbU16ilEHxf6SG/d1UHZZ4qWqpK16ermUjExGJRNFl2/uGU+77Oogbt/u4SWkySrcU4s eKCSugjcuK1gOxr1zDywT3kPQt/mEcdPC7Oxbc9M6fhHfEjMR3KB9CJxtHg8XMKNmNt0iV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g5PhSuzObiCdV9zIETVGyOAq+dK67SvlqI6fguI+mIfoMapDH9K/097f70kXA5gUMdfbWu3ZYPbHC4H/JmI1iWYHb1jNcBCnoFsRQgTOP0jF2PSiBTZ3msUKIm/D07C5ypDZ3FRo+zhLyNxiC7HodZZmpeEFCDDW/od5mYW/cLcC+SLNVunScKVbW6UI8h1hGvtAnkxLp7NObb4TMX5trf04137ubQvQov7jEyBNbZm2iITnsrxWIMbzAz1aF750d6zwSty6991tJRH91a4btnSAo2OITdxO8yX977UAzpZdSYTlu6BN+rV2JiBuktysMDNh4uU+6piQrOinKn X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2CoBAACkrle/xCltltmglCCKoFkEiyNJYV6jBiPXYF7CwEBAQEBAQEBATQBAgQBAYREgg0nNAkOAgMBAQEDAgUBAQYBAQEBAQEEBAFsBAEBBwoCAYROIQEDAQEFCgFDgjsig0ILASMjT3ASgyaCWCmwQTOFUYNWgUCBOIddhQGBQT+EX4pCBLJrglSCcZUrDB2dOpAdnyQ5gVZNIBiDJFAYDZ8KQjA3AgYIAQEDCVcBIgGOCAEB X-IPAS-Result: A2CoBAACkrle/xCltltmglCCKoFkEiyNJYV6jBiPXYF7CwEBAQEBAQEBATQBAgQBAYREgg0nNAkOAgMBAQEDAgUBAQYBAQEBAQEEBAFsBAEBBwoCAYROIQEDAQEFCgFDgjsig0ILASMjT3ASgyaCWCmwQTOFUYNWgUCBOIddhQGBQT+EX4pCBLJrglSCcZUrDB2dOpAdnyQ5gVZNIBiDJFAYDZ8KQjA3AgYIAQEDCVcBIgGOCAEB Received: from 16.165-182-91.adsl-dyn.isp.belgacom.be (HELO biggussolus.home) ([91.182.165.16]) by relay.skynet.be with ESMTP; 11 May 2020 20:02:31 +0200 From: Fabian Frederick To: jack@suse.cz, amir73il@gmail.com Cc: linux-fsdevel@vger.kernel.org, Fabian Frederick Subject: [PATCH 7/9 linux-next] fanotify: don't write with zero size Date: Mon, 11 May 2020 20:02:27 +0200 Message-Id: <20200511180227.215152-1-fabf@skynet.be> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org check count in fanotify_write() and return -EINVAL when 0 Signed-off-by: Fabian Frederick --- 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 02a314acc757..6e19dacb2475 100644 --- a/fs/notify/fanotify/fanotify_user.c +++ b/fs/notify/fanotify/fanotify_user.c @@ -485,6 +485,9 @@ static ssize_t fanotify_write(struct file *file, const char __user *buf, size_t if (!IS_ENABLED(CONFIG_FANOTIFY_ACCESS_PERMISSIONS)) return -EINVAL; + if (!count) + return -EINVAL; + group = file->private_data; if (count > sizeof(response)) From patchwork Mon May 11 18:02:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabian Frederick X-Patchwork-Id: 11541405 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 123E1912 for ; Mon, 11 May 2020 18:02:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0353C20736 for ; Mon, 11 May 2020 18:02:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731026AbgEKSCy (ORCPT ); Mon, 11 May 2020 14:02:54 -0400 Received: from mailrelay107.isp.belgacom.be ([195.238.20.134]:58645 "EHLO mailrelay107.isp.belgacom.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726891AbgEKSCy (ORCPT ); Mon, 11 May 2020 14:02:54 -0400 IronPort-SDR: XGyN8aMpHJVF20AUpYqThvCEM0iidIWZczC07DEU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i0OCRQEB Received: from 16.165-182-91.adsl-dyn.isp.belgacom.be (HELO biggussolus.home) ([91.182.165.16]) by relay.skynet.be with ESMTP; 11 May 2020 20:02:51 +0200 From: Fabian Frederick To: jack@suse.cz, amir73il@gmail.com Cc: linux-fsdevel@vger.kernel.org, Fabian Frederick Subject: [PATCH 8/9 linux-next] fanotify: clarify mark type extraction Date: Mon, 11 May 2020 20:02:45 +0200 Message-Id: <20200511180245.215198-1-fabf@skynet.be> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org mark type is resolved from flags but is not itself bitwise. That means user could send a combination and never note only one value was taken in consideration. This patch clarifies that fact in bit definitions. Thanks to Amir for explanations. Signed-off-by: Fabian Frederick --- include/uapi/linux/fanotify.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/include/uapi/linux/fanotify.h b/include/uapi/linux/fanotify.h index a88c7c6d0692..675bf6bbbe50 100644 --- a/include/uapi/linux/fanotify.h +++ b/include/uapi/linux/fanotify.h @@ -71,7 +71,12 @@ #define FAN_MARK_FLUSH 0x00000080 /* FAN_MARK_FILESYSTEM is 0x00000100 */ -/* These are NOT bitwise flags. Both bits can be used togther. */ +/* + * These are NOT bitwise flags. Both bits can be used together. + * IOW if someone does FAN_MARK_INODE | FAN_MARK_FILESYSTEM + * it will be considered FAN_MARK_FILESYSTEM and user won't be + * notified. + */ #define FAN_MARK_INODE 0x00000000 #define FAN_MARK_MOUNT 0x00000010 #define FAN_MARK_FILESYSTEM 0x00000100 From patchwork Mon May 11 18:03:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabian Frederick X-Patchwork-Id: 11541407 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 451CE912 for ; Mon, 11 May 2020 18:03:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 35056206B9 for ; Mon, 11 May 2020 18:03:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731061AbgEKSDj (ORCPT ); Mon, 11 May 2020 14:03:39 -0400 Received: from mailrelay107.isp.belgacom.be ([195.238.20.134]:58693 "EHLO mailrelay107.isp.belgacom.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726891AbgEKSDj (ORCPT ); Mon, 11 May 2020 14:03:39 -0400 IronPort-SDR: VUq4jO75KW4H3TgsSOFgBFUo9vAEUdMNiSd5BWXN7y18LYE7ofKn66OXrim0BUh82D5eNZjRca f06kf1ferT2TBmt785tOOesjePmPcSZv5NQrw9iHAPRF36soHC85WyyQ1GqEwGysj5Mg1zyxFW pVTpxrmEkWRxgwEyR8WnV4Ow/40jghhQs2Kp1A1Mf//y/9Z3YbpgseKsUq3HTnNx2sP7jdBUEy rg0A421F+Pk0unSujCPB0jeXS6ivyTFVOcQpziXnaogGG54tmG1faJkWxNjDqmy897kEwGG2o4 +lA= X-Belgacom-Dynamic: yes IronPort-PHdr: 9a23:ZUoO0hJEWyVjs6zkjdmcpTZWNBhigK39O0sv0rFitYgfLvTxwZ3uMQTl6Ol3ixeRBMOHsq8C2rKd6vm7EUU7or+5+EgYd5JNUxJXwe43pCcHRPC/NEvgMfTxZDY7FskRHHVs/nW8LFQHUJ2mPw6arXK99yMdFQviPgRpOOv1BpTSj8Oq3Oyu5pHfeQpFiCe9bL9oKBi6sQrdutQLjYZsN6081gbHrnxUdupM2GhmP0iTnxHy5sex+J5s7SFdsO8/+sBDTKv3Yb02QaRXAzo6PW814tbrtQTYQguU+nQcSGQWnQFWDAXD8Rr3Q43+sir+tup6xSmaIcj7Rq06VDi+86tmTgLjhSEaPDA77W7XkNR9gqJFrhy8qRJxwInab46aO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EDAQEFCgFDgjsig0ILASMjT3ASgyaCWCmwRDOFUYNXgUCBOIddhQGBQT+EX4QGhjwEjkakJYJUgnGVKwwdnTotj3CfOyKBVk0gGDuCaVAYDZBMF44nQjA3AgYIAQEDCVcBIgGLVII0AQE X-IPAS-Result: A2BLBwAhk7le/xCltltmhHqBZBIsjSWFeowYijKHJgsBAQEBAQEBAQE0AQIEAQGERIINJzgTAgMBAQEDAgUBAQYBAQEBAQEEBAFsBAEBBwoCAYROIQEDAQEFCgFDgjsig0ILASMjT3ASgyaCWCmwRDOFUYNXgUCBOIddhQGBQT+EX4QGhjwEjkakJYJUgnGVKwwdnTotj3CfOyKBVk0gGDuCaVAYDZBMF44nQjA3AgYIAQEDCVcBIgGLVII0AQE Received: from 16.165-182-91.adsl-dyn.isp.belgacom.be (HELO biggussolus.home) ([91.182.165.16]) by relay.skynet.be with ESMTP; 11 May 2020 20:03:16 +0200 From: Fabian Frederick To: jack@suse.cz, amir73il@gmail.com Cc: linux-fsdevel@vger.kernel.org, Fabian Frederick Subject: [PATCH 9/9 linux-next] fsnotify: fsnotify_clear_marks_by_group() massage Date: Mon, 11 May 2020 20:03:05 +0200 Message-Id: <20200511180305.215252-1-fabf@skynet.be> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org revert condition and remove clear label Signed-off-by: Fabian Frederick --- fs/notify/mark.c | 37 ++++++++++++++++++------------------- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/fs/notify/mark.c b/fs/notify/mark.c index 1d96216dffd1..ca2eba786bb6 100644 --- a/fs/notify/mark.c +++ b/fs/notify/mark.c @@ -724,28 +724,27 @@ void fsnotify_clear_marks_by_group(struct fsnotify_group *group, LIST_HEAD(to_free); struct list_head *head = &to_free; - /* Skip selection step if we want to clear all marks. */ - if (type_mask == FSNOTIFY_OBJ_ALL_TYPES_MASK) { + if (type_mask != FSNOTIFY_OBJ_ALL_TYPES_MASK) { + /* + * We have to be really careful here. Anytime we drop mark_mutex, + * e.g. fsnotify_clear_marks_by_inode() can come and free marks. + * Even in our to_free list so we have to use mark_mutex even + * when accessing that list. And freeing mark requires us to drop + * mark_mutex. So we can reliably free only the first mark in the + * list. That's why we first move marks to free to to_free list + * in one go and then free marks in to_free list one by one. + */ + mutex_lock_nested(&group->mark_mutex, SINGLE_DEPTH_NESTING); + list_for_each_entry_safe(mark, lmark, &group->marks_list, g_list) { + if ((1U << mark->connector->type) & type_mask) + list_move(&mark->g_list, &to_free); + } + mutex_unlock(&group->mark_mutex); + } else { + /* Skip selection step if we want to clear all marks. */ head = &group->marks_list; - goto clear; } - /* - * We have to be really careful here. Anytime we drop mark_mutex, e.g. - * fsnotify_clear_marks_by_inode() can come and free marks. Even in our - * to_free list so we have to use mark_mutex even when accessing that - * list. And freeing mark requires us to drop mark_mutex. So we can - * reliably free only the first mark in the list. That's why we first - * move marks to free to to_free list in one go and then free marks in - * to_free list one by one. - */ - mutex_lock_nested(&group->mark_mutex, SINGLE_DEPTH_NESTING); - list_for_each_entry_safe(mark, lmark, &group->marks_list, g_list) { - if ((1U << mark->connector->type) & type_mask) - list_move(&mark->g_list, &to_free); - } - mutex_unlock(&group->mark_mutex); -clear: while (1) { mutex_lock_nested(&group->mark_mutex, SINGLE_DEPTH_NESTING); if (list_empty(head)) {