Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp2802723ybi; Thu, 18 Jul 2019 14:48:45 -0700 (PDT) X-Google-Smtp-Source: APXvYqwUb/uKw31qbAngT2vf7PqtjhotxbcDQx+UJgaZnfkDdb9nJKkdN0nBRbwoyi7WK3biMk2s X-Received: by 2002:a17:902:7791:: with SMTP id o17mr53329833pll.27.1563486525675; Thu, 18 Jul 2019 14:48:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563486525; cv=none; d=google.com; s=arc-20160816; b=sl3k8WSNpHGh3OWGDE8NYEkhve4DuKEqVL7VkwFjItoSZD4hzyORyREchoIOaqiK3z moAyOBtLpS9KanamL6NIz3SCp7T4nAQTdrG7BjlKmFtobe3DI6gGFGD/58/ajBCFo8Oo Ih+fxDPv62odsK8ExuLGdfjnOcrjbJSCbojYFbiPNZyD7e+7/2wPA7Uzn5LjHhN14vze TmH33VTG+kip6eTWF/dN5xRYFkajHh4KpybfIfW+auG0Pq2NP1BL3Ce1LzSBnwc/+YtR BWYZK/63oH4Pjoidbyp5+ASs16Y2gVoSGCcxqvvR37mt3DGbJ48WMKtO8szt4o4LO7GS uOlg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=V90HhcWbibDdV+Hl4DqdmtK6PSYfay5zZUxbiy11qL8=; b=leaAIF49HVBrjPW8pDv+hpwrWPc+I1U/bxRx/9/zR/C2PzqAFENzDWtkGBZe/QV+nZ tS8R8qr+LErVG5SrEGxbIgTExA7V17sqmqvkHwxwE7DfOAliH2h0zCTJ5iRgpwjLYeqP j0+aX3vl1V2Xjvgwn+rWl45rJBRtQlO7zHsQ4evCrN4V5LI8iXg5zl1+NT7O3mOUzMQP XsPU5wpMglZGnVH0/pb/Pgcik85fIGPOgizYb/Nr2p9QoUN4uXoC1n85DUYRIBuefZfV IxyPEmUYqSfmoubsfK0qoVqtrZkV0sJpTU4kBLvNBajRkY4boZBYTWFg9JdIxaAMG8Pu H72g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=Abgndksi; spf=pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h69si2046011pge.543.2019.07.18.14.48.19; Thu, 18 Jul 2019 14:48:45 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=Abgndksi; spf=pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727928AbfGRVsQ (ORCPT + 99 others); Thu, 18 Jul 2019 17:48:16 -0400 Received: from mail-lj1-f193.google.com ([209.85.208.193]:40143 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727685AbfGRVsQ (ORCPT ); Thu, 18 Jul 2019 17:48:16 -0400 Received: by mail-lj1-f193.google.com with SMTP id m8so28784015lji.7 for ; Thu, 18 Jul 2019 14:48:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=V90HhcWbibDdV+Hl4DqdmtK6PSYfay5zZUxbiy11qL8=; b=AbgndksikCBx58WAsi1ZczhBouPLUfbgjv2sLtcDmsg8pYFCnm2zhxh9h2WQ1oZOAa rQmJ9vzofCYprP8eVKn1nAZCuA6rj6P1X+ofHAMx8hqNbSoQpeXpkLPrni4gm2YCoC8t ZOy8gHGdwD8Q6udD5ij1jCGNlNuIpsQhmDFo8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=V90HhcWbibDdV+Hl4DqdmtK6PSYfay5zZUxbiy11qL8=; b=UVQ4HaA3GotkvssD2xXkkSrQ+0WG/rZddk3ad4sRxEPp8W94M5e2nESYlGh4XrV9n4 Ao2WQthIJtGeUAvXcKIpaTYzGt6LSzKDuFxiW67isMYoMOeJiE4Kq5g469B0w1CD12ge zNUjafKplt+uAnk3wYPunNMuhX83JhodFJql6Ims9cXBppiLTVznQo70EKptCh2iI1mS 5eFKYS1ylz2ckVNUzXU0d8j1Rsbe7DlnwcQKY4/A8H1NGnFVJPGSn6VKP02JMAhhH00W kp08y3y5CDxNhKH5opyWiiOR0WV1E8TzH+bWFIlrN5Z27awsP+DjODCjf4iXBowf1YWl hg1Q== X-Gm-Message-State: APjAAAX97+lKLDNIWnsnNH5jxFq+e++06GrYBboWRWEvBM7h8gXECwUF 3Sq1Z2I6AlCYloli3F/MBElzBe3TUqc= X-Received: by 2002:a2e:730d:: with SMTP id o13mr8192558ljc.81.1563486494083; Thu, 18 Jul 2019 14:48:14 -0700 (PDT) Received: from mail-lf1-f43.google.com (mail-lf1-f43.google.com. [209.85.167.43]) by smtp.gmail.com with ESMTPSA id f30sm4134873lfa.48.2019.07.18.14.48.13 for (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Thu, 18 Jul 2019 14:48:13 -0700 (PDT) Received: by mail-lf1-f43.google.com with SMTP id c19so20282809lfm.10 for ; Thu, 18 Jul 2019 14:48:13 -0700 (PDT) X-Received: by 2002:ac2:5601:: with SMTP id v1mr22485468lfd.106.1563486492738; Thu, 18 Jul 2019 14:48:12 -0700 (PDT) MIME-Version: 1.0 References: <333e896cf5bcadd8547fbe4a06388dd3104ff910.camel@hammerspace.com> In-Reply-To: <333e896cf5bcadd8547fbe4a06388dd3104ff910.camel@hammerspace.com> From: Linus Torvalds Date: Thu, 18 Jul 2019 14:47:56 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [GIT PULL] Please pull NFS changes for Linux 5.3 To: Trond Myklebust Cc: "linux-nfs@vger.kernel.org" , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On Thu, Jul 18, 2019 at 1:25 PM Trond Myklebust wrote: > > git://git.linux-nfs.org/projects/trondmy/linux-nfs.git tags/nfs-for-5.3-1 This got a conflict with the debugfs "don't behave differently on failures" changes in net/sunrpc/debugfs.c. See commit 0a0762c6c604 ("sunrpc: no need to check return value of debugfs_create functions") by Greg, but I suspect you were already aware of this. I did a hack-and-slash "remove the error handling", and the end result looks sane. Except I left the "if the snprintf overflows" error handling in place, even if nothing then cares about the returned error. I think my merge resolution makes sense, but I thought I'd mention it in case you had something else in mind. Honestly, the snprintf() checks in do_xprt_debugfs() look kind o fpointless, but the comment is also wrong: char link[9]; /* enough for 8 hex digits + NULL */ that comment was copied from the "name[]" array in rpc_clnt_debugfs_register(), but it's bogus, since you actually use len = snprintf(link, sizeof(link), "xprt%d", *nump); on the thing. And you know what? If you have so many links that "xprt%d" doesn't fit in 8 chars plus NUL, maybe you don't really care? But it's also worth noting that the whole snprintf() overflow check is *wrong* to begin with. When you do if (len > sizeof(link)) return -1; you're testing the wrong thing entirely. The returned "len" is the length that would have been printed _without_ the ending NUL character, so you actually had a truncation even if it returns "sizeof(link)" - because then the NUL character was written instead of the last character. So the overflow test *should* have been if (len >= sizeof(link)) return -1; but I suspect the correct thing to do is to just say "we don't care" and remove that error check entirely. Same goes for the other case ("len > sizeof(name)"). At some point error handling doesn't actually add value, as long as the error itself isn't fatal. And when the error handling itself is wrong, it's doubly suspect. But as mentioned, I did *not* remove this part of the error handling. I only removed the debugfs parts. The error handling may be wrong, but it is what it is, and it doesn't really matter. Linus