From owner-freebsd-current@FreeBSD.ORG Mon Aug 23 13:47:24 2010 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C43761065694 for ; Mon, 23 Aug 2010 13:47:24 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from mx0.hoeg.nl (unknown [IPv6:2a01:4f8:101:5343::aa]) by mx1.freebsd.org (Postfix) with ESMTP id 8433C8FC1A for ; Mon, 23 Aug 2010 13:47:24 +0000 (UTC) Received: by mx0.hoeg.nl (Postfix, from userid 1000) id E3FD72A28D2E; Mon, 23 Aug 2010 15:47:23 +0200 (CEST) Date: Mon, 23 Aug 2010 15:47:23 +0200 From: Ed Schouten To: Kostik Belousov Message-ID: <20100823134723.GC64651@hoeg.nl> References: <201008230826.49509.jhb@freebsd.org> <20100823132551.GE2396@deviant.kiev.zoral.com.ua> <20100823133555.GA64651@hoeg.nl> <20100823134459.GF2396@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="JgQwtEuHJzHdouWu" Content-Disposition: inline In-Reply-To: <20100823134459.GF2396@deviant.kiev.zoral.com.ua> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: Ian FREISLICH , freebsd-current@freebsd.org Subject: Re: fusefs-kmod broken? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Aug 2010 13:47:24 -0000 --JgQwtEuHJzHdouWu Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Kostik Belousov wrote: > On Mon, Aug 23, 2010 at 03:35:55PM +0200, Ed Schouten wrote: > > * Kostik Belousov wrote: > > > Which most likely means that fusesfs filled its own struct fileops > > > without properly initializing fo_truncate member. > >=20 > > It's a bit misleading that cdevs automatically patch the table, while > > the fileops don't. Maybe it would be a good idea to patch finit() to > I do not understand your first sentence. Would you please elaborate ? Say, you create a cdev, if you don't implement all ops, it will check for null pointers and return error codes accordingly. This doesn't happen for fileops, which is probably one of the reasons why people sometimes forget to implement them. Wouldn't it be better to prevent this form of footshooting by adding assertions? This will add some overhead for any file descriptor created, but a kernel with INVARIANTS isn't meant to be fast. --=20 Ed Schouten WWW: http://80386.nl/ --JgQwtEuHJzHdouWu Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (FreeBSD) iEYEARECAAYFAkxye+sACgkQ52SDGA2eCwXtewCfeU4xVL5Q5bEYTTGDTntIhpwY n6kAnibyW8f9geMMz1zsMmgw2L8UulKV =hxFa -----END PGP SIGNATURE----- --JgQwtEuHJzHdouWu--