From owner-svn-src-head@freebsd.org Sun Dec 6 19:25:05 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 098624A8ADA; Sun, 6 Dec 2020 19:25:05 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-wr1-x432.google.com (mail-wr1-x432.google.com [IPv6:2a00:1450:4864:20::432]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CpxGm6kdHz4k5f; Sun, 6 Dec 2020 19:25:04 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-wr1-x432.google.com with SMTP id r3so10666812wrt.2; Sun, 06 Dec 2020 11:25:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=g7qk1LiKBDI+3Suw79ikXz4KD3lt4vNJTR91UJX87FM=; b=RkR/VBvW5UCpITVM722rnezFvaRndnp4mmZlCJx30W+iOd5uo4bsTTjcA5D5NaLsXs KSElRHvDgvR7s2y9q+exfkOahjDAyP2lmw3KkOIlYqC9V3QZKMdYsAAdIj3cXycTHj66 q8EwGTkoHxddGZr7lvly6+KIFcpY5n/4sZ8/ThAEAPYKJPk07VqZamecFXwGCJ8FJ4kC 2yhw8UNV/TIbb/NWIWe6qemRqtvdkCcWdHyhbUF0v5bQsQOonflZCku3osfkkxKN6BXW c0cFotwX9OHGehTT6oixUdMb9iYQiWwHMdOg8oltHYKeudxGoObdTABXyBBI1FgXVt2+ gGFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=g7qk1LiKBDI+3Suw79ikXz4KD3lt4vNJTR91UJX87FM=; b=KDXfUuNdy6fjcO9aRlcFZYsIlNacP/GP4bQfZSf5zxmXUZIT0CaiGSm3XOyJI2XOs/ 4izaKgJE6Y1fZSueL4Z8h+g8p34EnighKp2ztiXKrXOHufMVzaSDBUlNt7CoSWObx2ka tl8yQQ7DSzrHTciDX9VpEqXGRaKwgxdU2EC/EX4BOpzrTKXdiZ3XP14hB0wZsndMPT34 OO0Kyt72UdI8OKpYJb2aI9CXWlXFgpl87qfGMSKgHgUVwti0W1C2wu7zEvC31hMuVyzj bZXbkPZO2MQb2x9ZEbWPFMRBac8CTUyCao3oznOpspCPUAk2ka1ZWoSKXhXHN2kxjLZ7 OPkA== X-Gm-Message-State: AOAM530p0nksQPqpRo776lX39VAglxFpcMBKN0AUnUmO+wHPeHNgCVu8 6YQUFepThoYjcw8YEqBB+3wJVZGhTLOazvCKKotoO4YKQo8= X-Google-Smtp-Source: ABdhPJx9N7SeEUweNfiQz679eeZaGYn6EmfcxkAabMPMr+x1ohwo0borVPni55fsRk76Go3zXt98aaTZDKCPeYsW044= X-Received: by 2002:a5d:4d02:: with SMTP id z2mr16508621wrt.109.1607282703101; Sun, 06 Dec 2020 11:25:03 -0800 (PST) MIME-Version: 1.0 Received: by 2002:a5d:4d47:0:0:0:0:0 with HTTP; Sun, 6 Dec 2020 11:25:02 -0800 (PST) In-Reply-To: References: <202012060459.0B64xO7Z064250@repo.freebsd.org> From: Mateusz Guzik Date: Sun, 6 Dec 2020 20:25:02 +0100 Message-ID: Subject: Re: svn commit: r368375 - head/sys/kern To: Jessica Clarke Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4CpxGm6kdHz4k5f X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Dec 2020 19:25:05 -0000 Thanks for the report. Fixed in r368395. On 12/6/20, Jessica Clarke wrote: > Hi Mateusz, > This looks like a behavioural change to me. Was that intended and a bug > fix (in which case, it should have been documented in the commit > message) or not? See below for the exact change. > > On 6 Dec 2020, at 04:59, Mateusz Guzik wrote: >> +static int >> +namei_getpath(struct nameidata *ndp) >> +{ >> + struct componentname *cnp; >> + int error; >> + >> + cnp = &ndp->ni_cnd; >> + >> + /* >> + * Get a buffer for the name to be translated, and copy the >> + * name into the buffer. >> + */ >> + cnp->cn_pnbuf = uma_zalloc(namei_zone, M_WAITOK); >> + if (ndp->ni_segflg == UIO_SYSSPACE) { >> + error = copystr(ndp->ni_dirp, cnp->cn_pnbuf, MAXPATHLEN, >> + &ndp->ni_pathlen); >> + } else { >> + error = copyinstr(ndp->ni_dirp, cnp->cn_pnbuf, MAXPATHLEN, >> + &ndp->ni_pathlen); >> + } >> + >> + if (__predict_false(error != 0)) { >> + return (error); > > This does not call namei_cleanup_cnp. > >> @@ -531,31 +568,11 @@ namei(struct nameidata *ndp) >> ndp->ni_lcf = 0; >> ndp->ni_vp = NULL; >> >> - /* >> - * Get a buffer for the name to be translated, and copy the >> - * name into the buffer. >> - */ >> - cnp->cn_pnbuf = uma_zalloc(namei_zone, M_WAITOK); >> - if (ndp->ni_segflg == UIO_SYSSPACE) >> - error = copystr(ndp->ni_dirp, cnp->cn_pnbuf, MAXPATHLEN, >> - &ndp->ni_pathlen); >> - else >> - error = copyinstr(ndp->ni_dirp, cnp->cn_pnbuf, MAXPATHLEN, >> - &ndp->ni_pathlen); >> - >> + error = namei_getpath(ndp); >> if (__predict_false(error != 0)) { >> - namei_cleanup_cnp(cnp); > > But it used to be called in that case here. > >> return (error); >> } > > Jess > > -- Mateusz Guzik