Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp5816693imw; Wed, 20 Jul 2022 13:10:13 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vkl3Kiy6aMqV+WmZi15w45fzhyGj3d3EzeSP0sbIYQBIcQim/qFVlRrR2alcsfvaqQ7I2N X-Received: by 2002:a17:90b:3c4a:b0:1f2:205d:dbac with SMTP id pm10-20020a17090b3c4a00b001f2205ddbacmr4514026pjb.110.1658347813612; Wed, 20 Jul 2022 13:10:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658347813; cv=none; d=google.com; s=arc-20160816; b=V5jxzyEuL211UAaL0q/cQdB+IY/b5ZhiG1lwgr4kUBReD7qwwQpi8t4ua9kx0Qbu/9 ZqrHpQ1zdrSUTqlJ8xfUyKWJuLZm43//L0oNCZTzGBiincvAuVfKcGW3xvxjVGlMe91j Pq8FJGX8a74yVvE0iMFzwuHY+LcTpnZONi0QljjvJlST3NSmrDrSp+gFchFLUgmL97EV T+6+etiIsNfS2vIom4GUY2OVN+jyxgyH9x7i1mU3pBhH/50LR1oLmSMT/v57RZ1s/zhh W9h1he8T9f382Y1dj22FrU+bGJdHQgaa/IgaDa7TWgo30jTut0qa3uLDicmk1QtjKnwa +i1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=0PjadjtjZhNmKnJnHqCOGZdCzVxYykgNGxR63blwMuc=; b=wmkkQhRUVJmW1GK6p/614lfX4CJ5+cKa43ZiltgTloZtxaFnYtGdlropQL+1mdZ0yX rRP7+1ZVvfEATnj0onP4cQmEv4NfhsZgwhltkrxmyvq+GtD8OFIJwCL283N7tCeGlH+J jhevnnlDMy+csnO07qsRsvTOckmf+VPHcVCXA2TsFzQtDEAbWrsfGGXMlzFPbRGJrsJc nhcwgnFG03iwgCyYRjEIEjbDZjSdadjJSdcQbN5frz1AOhn2hTstwde8cFm9HG7g3B57 dxM/SgLDRt6mGoudx7QaZgRn+VNobLznS2BXkTwKgrssYG8Wr/tFVAbGQz/y18esBB3Z HfBQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=PRZcGNGD; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h1-20020aa796c1000000b0050d3e4009easi118248pfq.125.2022.07.20.13.09.47; Wed, 20 Jul 2022 13:10:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-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=@gmail.com header.s=20210112 header.b=PRZcGNGD; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229603AbiGTUB5 (ORCPT + 99 others); Wed, 20 Jul 2022 16:01:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33092 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229456AbiGTUB4 (ORCPT ); Wed, 20 Jul 2022 16:01:56 -0400 Received: from mail-lf1-x134.google.com (mail-lf1-x134.google.com [IPv6:2a00:1450:4864:20::134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D4297419A0 for ; Wed, 20 Jul 2022 13:01:55 -0700 (PDT) Received: by mail-lf1-x134.google.com with SMTP id e28so32007842lfj.4 for ; Wed, 20 Jul 2022 13:01:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=0PjadjtjZhNmKnJnHqCOGZdCzVxYykgNGxR63blwMuc=; b=PRZcGNGD2IVQGVsCfWadW8yWpUHwq/RDO8M4XvRs8Htci2xa8EchvhE9tM5pEU4dPQ FluTljvz1mr6ArCOWsAysEyZuArkbUOJ6aPzZdzJsYWGE9pCB2rjEpAH0nK9xCKbAEsn lxXzK8ocCkNgOwPG9zhBlxsjfgihEK9Ko1hZOWh1bniHZVo+YPMdvikSss2tZv8+JCW2 GfNumM61i7rGdjF2xoOhzx7OKKOyrp7Jmd8lny/SOPvC3m+JIK5q8g6neHcZsuNLmtHr YCiQ7+ApV2u8yj8D4jiBJE6VnWCfHQ/tTScBA1dIwAIEWAkrQCIfV7IrhfuI3YPtehMg hQvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=0PjadjtjZhNmKnJnHqCOGZdCzVxYykgNGxR63blwMuc=; b=hYOFD6wf8tpXQf65VAh+HbYc+GKykFwNNUuudrxAtm82hiHddI9IXlcRQwqT5iNJxt +kM8GEjvo1VLgl05eQq4rPYBu5FH+exoXH+WJjt/OHZIl65PkKntItFtLvkSIqpk5OF3 tyW1IC2E0/zwSMK8NF/pvvdiACrTc0ZviWGENL+gELyFCy+kZZvJEpWgKY72R3Idb5bJ YeDcvFhTRV+dVfz4ftoj9HKRltMHXTuTxC46VvaNP4i6DPxEZxKMujKlxxwRocCIZXkl dbso+5LlnMsCWcHnyLjW+XTaSJ9B89m0H0+5rS3bA96i24uyai3uQ2aznYJOqubTiEC+ x48A== X-Gm-Message-State: AJIora9WfW+qkOlcDNj3eVA3v9Wo+6uhsyZRNVbA5AohvyVIjRvaYMGB kyJhE517M1IR7sVi719IprtrPut2ry/ps0tJvMnGxh3vIyQ= X-Received: by 2002:a05:6512:3d06:b0:489:d0c2:649 with SMTP id d6-20020a0565123d0600b00489d0c20649mr21931794lfv.210.1658347313870; Wed, 20 Jul 2022 13:01:53 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Jan Kasiak Date: Wed, 20 Jul 2022 16:01:42 -0400 Message-ID: Subject: Re: NLM 4 Infinite Loop Bug To: linux-nfs@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS 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: X-Mailing-List: linux-nfs@vger.kernel.org Applying two commits from the Linux master branch seems to have fixed the problem: aec158242b87a43d83322e99bc71ab4428e5ab79 1197eb5906a5464dbaea24cac296dfc38499cc00 -Jan On Wed, Jul 20, 2022 at 2:46 PM Jan Kasiak wrote: > > Hi all, > > I'm writing my own NFS client, and while trying to test it, I've come > across a way to get the lockd thread into an infinite loop and stop > accepting any new requests. > > Kernel Version: Linux ubuntu-jammy 5.15.0-41-generic > > The client is a python program, and it does not run rpcbind, NLM, etc... > > I issue an NM_LOCK (procedure 22) request with block set to false, and > get a GRANTED reply. > > I then issue a FREE_ALL (procedure 23) request, and the lockd thread > gets stuck in nlm_traverse_locks - it matches the host, calls > nlm_unlock_files, and then jumps to the again label, and repeats this > loop forever. > > It's not clear to me who is supposed to unset the host from the lock? > Any pointers as to why there is a jump to again? > > Thanks, > -Jan