From owner-svn-src-all@freebsd.org Sun Sep 4 16:00:45 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B7A0BA9D9C4; Sun, 4 Sep 2016 16:00:45 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-it0-f42.google.com (mail-it0-f42.google.com [209.85.214.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6F3628BF; Sun, 4 Sep 2016 16:00:45 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-it0-f42.google.com with SMTP id e124so114064276ith.0; Sun, 04 Sep 2016 09:00:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=wfhgXsTgz7fcU5FK2rbTaBXPEtaGMJgdaRHhH6ye0FY=; b=M54OdEzOMzee2bB2zZQtfuvrgu1Kv3GXwKJi29DqD5g9vWtz+nhSCaXKI19OIPAyHe XVb1VNEQcMepr8pZ/W+l08CN6xOYscjRYWDm2f3+vKdzb6nAnbbCq3ZwgnLNnuTZSneO oL4uItSG6HVP9riRAtkX9aywCusPpkclJZ+J9fe8kj4NFieO8HDoXz+5kseaf3hmsT13 2Ml0Z5nQryfjoI2KeIiAoQmXGcuACY5cXxfq2C9Gm+jZYInPryir4N+tgV6eUZXztsE6 myo10M4Bm042JqRWhH+AqexRF4MVx2ezTOAWS9kaTaTtG38p9CJv26X5L8Rm4OVdC6HD r65w== X-Gm-Message-State: AE9vXwPDTsoIxzfgfiwOc4yY/Ov/jyQu/w4ugFn4+FvhCqAh2o0QYC9EwwftrkJyPaMhaQ== X-Received: by 10.36.196.133 with SMTP id v127mr17066686itf.84.1473004839534; Sun, 04 Sep 2016 09:00:39 -0700 (PDT) Received: from mail-it0-f42.google.com (mail-it0-f42.google.com. [209.85.214.42]) by smtp.gmail.com with ESMTPSA id v124sm7505824ita.22.2016.09.04.09.00.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 04 Sep 2016 09:00:39 -0700 (PDT) Received: by mail-it0-f42.google.com with SMTP id e124so113274933ith.0; Sun, 04 Sep 2016 09:00:39 -0700 (PDT) X-Received: by 10.36.227.73 with SMTP id d70mr16394560ith.97.1473004839057; Sun, 04 Sep 2016 09:00:39 -0700 (PDT) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.36.220.129 with HTTP; Sun, 4 Sep 2016 09:00:38 -0700 (PDT) In-Reply-To: <201609041331.u84DVwIX061144@repo.freebsd.org> References: <201609041331.u84DVwIX061144@repo.freebsd.org> From: Conrad Meyer Date: Sun, 4 Sep 2016 09:00:38 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r305383 - head/sys/sys To: Mateusz Guzik Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Sep 2016 16:00:45 -0000 Do you know which revision this was introduced (i.e. what revision range should be avoided)? The most relevant commit seems to be r305093 but I'm not sure how that would have broken this (nothing in that diff was checking fde_file before). Best, Conrad On Sun, Sep 4, 2016 at 6:31 AM, Mateusz Guzik wrote: > Author: mjg > Date: Sun Sep 4 13:31:57 2016 > New Revision: 305383 > URL: https://svnweb.freebsd.org/changeset/base/305383 > > Log: > fd: fix up fdeget_file > > It was supposed to return NULL if a fp is not installed. > > Facepalm-by: mjg > > Modified: > head/sys/sys/filedesc.h > > Modified: head/sys/sys/filedesc.h > ============================================================================== > --- head/sys/sys/filedesc.h Sun Sep 4 12:22:14 2016 (r305382) > +++ head/sys/sys/filedesc.h Sun Sep 4 13:31:57 2016 (r305383) > @@ -210,13 +210,18 @@ fget_locked(struct filedesc *fdp, int fd > static __inline struct filedescent * > fdeget_locked(struct filedesc *fdp, int fd) > { > + struct filedescent *fde; > > FILEDESC_LOCK_ASSERT(fdp); > > if (fd < 0 || fd > fdp->fd_lastfile) > return (NULL); > > - return (&fdp->fd_ofiles[fd]); > + fde = &fdp->fd_ofiles[fd]; > + if (fde->fde_file == NULL) > + return (NULL); > + > + return (fde); > } > > static __inline bool >