From owner-svn-src-head@freebsd.org Sun Oct 22 16:53:49 2017 Return-Path: Delivered-To: svn-src-head@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 53B4FE56862; Sun, 22 Oct 2017 16:53:49 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-it0-f44.google.com (mail-it0-f44.google.com [209.85.214.44]) (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 1CCD86D48F; Sun, 22 Oct 2017 16:53:48 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-it0-f44.google.com with SMTP id f187so3470763itb.1; Sun, 22 Oct 2017 09:53:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=B6fnTyUSHTo8byF9Lb9wxdu9R65BeaWEvGC8Vnd9360=; b=UHEFq9AITL3D3jNaNGFP28Iii9DcNhHdp35jSFTbeS5IipGZs4GaSNMDOeOTSRMoJK d8NH6hzbokWMnnLftUwQYoon5PXvaIsFf0+q0z37GZ6nePeNCHUILbVD0B65GuaXVTZX XbD9rt6NLt2ryLBj1PG4xLzyvoDmSQFy0WKh9N0hNC8Zs1HVaCrYt55pfEbQ2yIy5mmq p0mB/ei2krjmE8nrLAhFg756sQ1q3udqUXGDZ4gBv5R2JZAzoMyDUtqkQaEsa9ftMWt3 /F+SRb5RCZ2tatpZ1/h1EwUpgP6+QgOMcAw4krF1TP6jpO7XYeB/2ymSZ26YTwWZ7MD/ tYHg== X-Gm-Message-State: AMCzsaVntLGzbcsVYY8XpMBfXuFE9Z5V4YUogxGnnsoZrRzhBQxbe4VX aKs8/39lSGqleKOPecatQvw5nFUv X-Received: by 10.36.71.74 with SMTP id t71mr6385475itb.53.1508691227656; Sun, 22 Oct 2017 09:53:47 -0700 (PDT) Received: from mail-it0-f49.google.com (mail-it0-f49.google.com. [209.85.214.49]) by smtp.gmail.com with ESMTPSA id n132sm1543403itn.25.2017.10.22.09.53.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 22 Oct 2017 09:53:47 -0700 (PDT) Received: by mail-it0-f49.google.com with SMTP id r127so3454483itb.5; Sun, 22 Oct 2017 09:53:46 -0700 (PDT) X-Google-Smtp-Source: ABhQp+RT/IxQdgRYAGmFKE4dq/NoQusnynoe6+tGoPucIY1rcw893S1YmMGFWUI98zMKHjnArgRIc3ej/e/L/TrGLbU= X-Received: by 10.36.224.78 with SMTP id c75mr5745268ith.71.1508691226628; Sun, 22 Oct 2017 09:53:46 -0700 (PDT) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.2.164.130 with HTTP; Sun, 22 Oct 2017 09:53:46 -0700 (PDT) In-Reply-To: <201710220811.v9M8Bjw5033551@repo.freebsd.org> References: <201710220811.v9M8Bjw5033551@repo.freebsd.org> From: Conrad Meyer Date: Sun, 22 Oct 2017 09:53:46 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r324853 - in head/sys: kern sys To: Konstantin Belousov Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 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, 22 Oct 2017 16:53:49 -0000 Thanks! For other users that managed to create such files: fsck will clean them up. Best, Conrad On Sun, Oct 22, 2017 at 1:11 AM, Konstantin Belousov wrote: > Author: kib > Date: Sun Oct 22 08:11:45 2017 > New Revision: 324853 > URL: https://svnweb.freebsd.org/changeset/base/324853 > > Log: > Remove the support for mknod(S_IFMT), which created dummy vnodes with > VBAD type. > > FFS ffs_write() VOP catches such vnodes and panics, other VOPs do not > check for the type and their behaviour is really undefined. The > comment claims that this support was done for 'badsect' to flag bad > sectors, we do not have such facility in kernel anyway. > > Reported by: Dmitry Vyukov > Sponsored by: The FreeBSD Foundation > MFC after: 1 week > > Modified: > head/sys/kern/vfs_syscalls.c > head/sys/sys/priv.h > > Modified: head/sys/kern/vfs_syscalls.c > ============================================================================== > --- head/sys/kern/vfs_syscalls.c Sun Oct 22 07:58:28 2017 (r324852) > +++ head/sys/kern/vfs_syscalls.c Sun Oct 22 08:11:45 2017 (r324853) > @@ -1248,9 +1248,6 @@ kern_mknodat(struct thread *td, int fd, char *path, en > if (error == 0 && dev == VNOVAL) > error = EINVAL; > break; > - case S_IFMT: > - error = priv_check(td, PRIV_VFS_MKNOD_BAD); > - break; > case S_IFWHT: > error = priv_check(td, PRIV_VFS_MKNOD_WHT); > break; > @@ -1288,9 +1285,6 @@ restart: > whiteout = 0; > > switch (mode & S_IFMT) { > - case S_IFMT: /* used by badsect to flag bad sectors */ > - vattr.va_type = VBAD; > - break; > case S_IFCHR: > vattr.va_type = VCHR; > break; > > Modified: head/sys/sys/priv.h > ============================================================================== > --- head/sys/sys/priv.h Sun Oct 22 07:58:28 2017 (r324852) > +++ head/sys/sys/priv.h Sun Oct 22 08:11:45 2017 (r324853) > @@ -266,7 +266,7 @@ > #define PRIV_VFS_GETFH 327 /* Can retrieve file handles. */ > #define PRIV_VFS_GETQUOTA 328 /* getquota(). */ > #define PRIV_VFS_LINK 329 /* bsd.hardlink_check_uid */ > -#define PRIV_VFS_MKNOD_BAD 330 /* Can mknod() to mark bad inodes. */ > +#define PRIV_VFS_MKNOD_BAD 330 /* Was: mknod() can mark bad inodes. */ > #define PRIV_VFS_MKNOD_DEV 331 /* Can mknod() to create dev nodes. */ > #define PRIV_VFS_MKNOD_WHT 332 /* Can mknod() to create whiteout. */ > #define PRIV_VFS_MOUNT 333 /* Can mount(). */ >