Message ID | 20221118234357.243926-1-ak@linux.intel.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp488419wrr; Fri, 18 Nov 2022 16:45:55 -0800 (PST) X-Google-Smtp-Source: AA0mqf4pRbp2szArhHY+hC1p8Sjfj6N9+7ZGc22Oay+W/3seiG0O0FShfOuPg4BrD/A798gf+e3m X-Received: by 2002:a17:906:6892:b0:78d:ab48:bc84 with SMTP id n18-20020a170906689200b0078dab48bc84mr8354823ejr.22.1668818754804; Fri, 18 Nov 2022 16:45:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668818754; cv=none; d=google.com; s=arc-20160816; b=OX8PBODQLZojyxow9KCl6mDpowXztkE0fjHJ03NO6JGgZ0uqs3HQj+GPHyNsAW02zn BesgREmWG295PmrPuGZC+0QAN5KR4UtztKoe384Ay19ID/VctQi3HBNxL41NOhcc4uck 2apiYz3vfp3EI4HiqVz1seSAd2IFMcOhGJqmuPunAC+bRhePlY5ub0ZnXXh5Mnybr9gy u5rULsjrV4Hrcz9jD7PsITgHM7NV43gQO7113d+NMJEIjFET8qT/5c1uqBcIQOvBNO0Z KY8/E/N73XYjFcL+EERLJK/o4kwE0uPU8VaJoBYsRW/9tidZwr/Ft5AOlLnxu4tXavgC Ufzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=XQH/9UJnkPmx9IlZ3VgbHDKwVkaZF1lCRAguV2rbhEE=; b=bAAHPRDzhVK3l83T3qzNwNCyEjzglCpcD/wWlx3Ryj+SXuDJzJHY/bGUyrXQDWkrhP Sf5pW2KQLp7K3m6g8ff7CqvvtTBnczQz4UktTcSuf2/w5TFSo4BAsVPStlqAHyjFevOV B6Enx0huX3LRvV7mSLSF9zfF7u1KOOR2vGgrUoU9nXE7YOoeNNigvFnX+mVPWRTlnq5A tGf4rshuGTH6+qihyakMXccXAcG9oyMNq6uwrevofV3mgkMg0LClY7aNIs+XWMBJbghf JzN96tpkOh0A1tcmOg0/JXLMT16xExs6naCxpDlfIXnRMuFANxxqABUXAzeX/c4uWZa6 EhJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=NRJbx4oN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dn12-20020a17090794cc00b00773db351c39si4558520ejc.64.2022.11.18.16.45.24; Fri, 18 Nov 2022 16:45:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=NRJbx4oN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235778AbiKSAj0 (ORCPT <rfc822;kkmonlee@gmail.com> + 99 others); Fri, 18 Nov 2022 19:39:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36228 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236460AbiKSAib (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 18 Nov 2022 19:38:31 -0500 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 477A21181E0; Fri, 18 Nov 2022 15:44:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1668815052; x=1700351052; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=/aFv9Wut0HiigVqkQ+St300/wGo+tKi9PfSoYzzlmA8=; b=NRJbx4oNX9vI6yYm5SQt8W+pHuQ3E3BOFrbRcHzE8evDph2D3qXKHA3k dseP38yTuG7m7i3PbltBa0SPsE9GHAxbJBenoCg5VeOhFDjqX4xzimC5N ZKop8c8FpTLjXbnzpnePNf9kX9xtwIPunxUC3weJdfNobLlAEeG/HdzCX pWY5p8HPBZcFX/9wbD5DEbfBTLgeytr9COfS9q3rEKkyBv0CEkJWuONaP WFcrLbEnyQUDWIaxk8RnRy0IAgK+BKUtkSOLaFXVGohLwK0PrdZ2oSdEO ZswnYMZv3XKQCkzpQlXRwKUShZPIhVh0ppLx/nhvTYcn98XaR3knxpIr1 g==; X-IronPort-AV: E=McAfee;i="6500,9779,10535"; a="300801540" X-IronPort-AV: E=Sophos;i="5.96,175,1665471600"; d="scan'208";a="300801540" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Nov 2022 15:44:11 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10535"; a="634598112" X-IronPort-AV: E=Sophos;i="5.96,175,1665471600"; d="scan'208";a="634598112" Received: from tassilo.jf.intel.com ([10.54.74.11]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Nov 2022 15:44:11 -0800 From: Andi Kleen <ak@linux.intel.com> To: jlayton@kernel.org Cc: chuck.lever@oracle.com, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Andi Kleen <ak@linux.intel.com> Subject: [PATCH] Add process name to locks warning Date: Fri, 18 Nov 2022 15:43:57 -0800 Message-Id: <20221118234357.243926-1-ak@linux.intel.com> X-Mailer: git-send-email 2.37.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749883294907951949?= X-GMAIL-MSGID: =?utf-8?q?1749883294907951949?= |
Series |
Add process name to locks warning
|
|
Commit Message
Andi Kleen
Nov. 18, 2022, 11:43 p.m. UTC
It's fairly useless to complain about using an obsolete feature without
telling the user which process used it. My Fedora desktop randomly drops
this message, but I would really need this patch to figure out what
triggers is.
Signed-off-by: Andi Kleen <ak@linux.intel.com>
---
fs/locks.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
On Fri, 2022-11-18 at 15:43 -0800, Andi Kleen wrote: > It's fairly useless to complain about using an obsolete feature without > telling the user which process used it. My Fedora desktop randomly drops > this message, but I would really need this patch to figure out what > triggers is. > Interesting. The only program I know of that tried to use these was samba, but we patched that out a few years ago (about the time this patch went in). Are you running an older version of samba? > Signed-off-by: Andi Kleen <ak@linux.intel.com> > --- > fs/locks.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fs/locks.c b/fs/locks.c > index 607f94a0e789..2e45232dbeb1 100644 > --- a/fs/locks.c > +++ b/fs/locks.c > @@ -2096,7 +2096,7 @@ SYSCALL_DEFINE2(flock, unsigned int, fd, unsigned int, cmd) > * throw a warning to let people know that they don't actually work. > */ > if (cmd & LOCK_MAND) { > - pr_warn_once("Attempt to set a LOCK_MAND lock via flock(2). This support has been removed and the request ignored.\n"); > + pr_warn_once("%s: Attempt to set a LOCK_MAND lock via flock(2). This support has been removed and the request ignored.\n", current->comm); > return 0; > } > Looks reasonable. Would it help to print the pid or tgid as well?
On Fri, 2022-11-18 at 21:06 -0500, Jeff Layton wrote: > On Fri, 2022-11-18 at 15:43 -0800, Andi Kleen wrote: > > It's fairly useless to complain about using an obsolete feature without > > telling the user which process used it. My Fedora desktop randomly drops > > this message, but I would really need this patch to figure out what > > triggers is. > > > > Interesting. The only program I know of that tried to use these was > samba, but we patched that out a few years ago (about the time this > patch went in). Are you running an older version of samba? > > > Signed-off-by: Andi Kleen <ak@linux.intel.com> > > --- > > fs/locks.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/fs/locks.c b/fs/locks.c > > index 607f94a0e789..2e45232dbeb1 100644 > > --- a/fs/locks.c > > +++ b/fs/locks.c > > @@ -2096,7 +2096,7 @@ SYSCALL_DEFINE2(flock, unsigned int, fd, unsigned int, cmd) > > * throw a warning to let people know that they don't actually work. > > */ > > if (cmd & LOCK_MAND) { > > - pr_warn_once("Attempt to set a LOCK_MAND lock via flock(2). This support has been removed and the request ignored.\n"); > > + pr_warn_once("%s: Attempt to set a LOCK_MAND lock via flock(2). This support has been removed and the request ignored.\n", current->comm); > > return 0; > > } > > > > Looks reasonable. Would it help to print the pid or tgid as well? Merged into my locks-next branch, along with a small change to print current->pid in addition to current->comm. This should make v6.2. Thanks!
On 11/18/2022 6:06 PM, Jeff Layton wrote: > On Fri, 2022-11-18 at 15:43 -0800, Andi Kleen wrote: >> It's fairly useless to complain about using an obsolete feature without >> telling the user which process used it. My Fedora desktop randomly drops >> this message, but I would really need this patch to figure out what >> triggers is. >> > Interesting. The only program I know of that tried to use these was > samba, but we patched that out a few years ago (about the time this > patch went in). Are you running an older version of samba? Yes it's running samba, whatever is in Fedora 35. Don't know if that counts as an older version. > >> Signed-off-by: Andi Kleen <ak@linux.intel.com> >> --- >> fs/locks.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/fs/locks.c b/fs/locks.c >> index 607f94a0e789..2e45232dbeb1 100644 >> --- a/fs/locks.c >> +++ b/fs/locks.c >> @@ -2096,7 +2096,7 @@ SYSCALL_DEFINE2(flock, unsigned int, fd, unsigned int, cmd) >> * throw a warning to let people know that they don't actually work. >> */ >> if (cmd & LOCK_MAND) { >> - pr_warn_once("Attempt to set a LOCK_MAND lock via flock(2). This support has been removed and the request ignored.\n"); >> + pr_warn_once("%s: Attempt to set a LOCK_MAND lock via flock(2). This support has been removed and the request ignored.\n", current->comm); >> return 0; >> } >> > Looks reasonable. Would it help to print the pid or tgid as well? It wouldn't help me because at that time I see it it's likely long gone. Just need the name.
diff --git a/fs/locks.c b/fs/locks.c index 607f94a0e789..2e45232dbeb1 100644 --- a/fs/locks.c +++ b/fs/locks.c @@ -2096,7 +2096,7 @@ SYSCALL_DEFINE2(flock, unsigned int, fd, unsigned int, cmd) * throw a warning to let people know that they don't actually work. */ if (cmd & LOCK_MAND) { - pr_warn_once("Attempt to set a LOCK_MAND lock via flock(2). This support has been removed and the request ignored.\n"); + pr_warn_once("%s: Attempt to set a LOCK_MAND lock via flock(2). This support has been removed and the request ignored.\n", current->comm); return 0; }