From nobody Sun Mar 19 11:14:04 2023 X-Original-To: freebsd-current@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PfZxy1ghnz405vP for ; Sun, 19 Mar 2023 11:14:14 +0000 (UTC) (envelope-from meka@tilda.center) Received: from c3po.tilda.center (c3po.tilda.center [108.61.164.129]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4PfZxw4zFTz42Qk for ; Sun, 19 Mar 2023 11:14:12 +0000 (UTC) (envelope-from meka@tilda.center) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=tilda.center header.s=c3po header.b=elHVzvsk; spf=pass (mx1.freebsd.org: domain of meka@tilda.center designates 108.61.164.129 as permitted sender) smtp.mailfrom=meka@tilda.center; dmarc=pass (policy=reject) header.from=tilda.center Received: from tilda.center (meka.rs [109.93.255.137]) by c3po.tilda.center (Postfix) with ESMTPSA id 330D410053 for ; Sun, 19 Mar 2023 12:12:57 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tilda.center; s=c3po; t=1679224377; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=CktD2x5Crd0bnYKAj7FX6rQGfU3WH6HUFrcU38VCHIY=; b=elHVzvskj79CTfnebkJ9E/EH3nboWtaAmnk5W3W/VQuT2OKH2KOL5rsGeidXneoCyn2h/a MZT3IlYdHRblWtW5706KkxzoADWAnX7xlPodIHC4i7PCYRSKETDlwNL88SadDUYapNs3cE mJ+MzXKFJzTrmgyJVhNaPe0ZN4H/LCw= Date: Sun, 19 Mar 2023 12:14:04 +0100 From: Goran =?utf-8?B?TWVracSH?= To: freebsd-current@FreeBSD.org Subject: Infinite loop with d_write_t Message-ID: <20230319111404.a6ac2w44u4trtedy@tilda.center> List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="jeef5soifo62kmrh" Content-Disposition: inline X-Spamd-Result: default: False [-5.27 / 15.00]; SIGNED_PGP(-2.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; R_MIXED_CHARSET(0.83)[subject]; DMARC_POLICY_ALLOW(-0.50)[tilda.center,reject]; MIME_GOOD(-0.20)[multipart/signed,text/plain]; R_SPF_ALLOW(-0.20)[+mx]; R_DKIM_ALLOW(-0.20)[tilda.center:s=c3po]; ASN(0.00)[asn:20473, ipnet:108.61.164.0/22, country:US]; FROM_EQ_ENVFROM(0.00)[]; MLMMJ_DEST(0.00)[freebsd-current@FreeBSD.org]; MIME_TRACE(0.00)[0:+,1:+,2:~]; DKIM_TRACE(0.00)[tilda.center:+]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; MID_RHS_MATCH_FROM(0.00)[]; ARC_NA(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_HAS_DN(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-current@freebsd.org]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TO_DN_NONE(0.00)[]; RCVD_TLS_ALL(0.00)[] X-Rspamd-Queue-Id: 4PfZxw4zFTz42Qk X-Spamd-Bar: ----- X-ThisMailContainsUnwantedMimeParts: N --jeef5soifo62kmrh Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Hello, I'm trying to assemble a minimal kernel module and user space program as a skeleton, and no matter what I do I get infinite loop. The code for kernel is https://github.com/mekanix/freebsd-project/blob/master/kernel/main.c. The way to test: # make # sudo kldload ./hello.ko # echo "something" >/dev/hello Write done. Write done. ... What am I doing wrong and where does that infinite loop comes from? Regards, meka --jeef5soifo62kmrh Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEE1WIFkXy2ZeMKjjKEWj1TknovrLYFAmQW7nkACgkQWj1Tknov rLaaqRAAlmGhACuRspncletbMqW3nQF1/hVzbvlXg+Jcp5Z0jHJFyO8vVPPVnruE 4tzA1RI+GNrA5N1dUbOUpBpFjo65b3KHFus/tZN1zm4MyTB4NWdJZXW4k9AIh8EX F1/yeeh/9uUtd5gFVyFuEBM9Lv84mk2+OIADjW6ArmL9tEouTJw/rs53U5AMWCYj fFA+uTb2uUmZyAp6BOzwNpGND1Qede3ca/4xWoAMzIlIIMt/e6qisIUPElXYyb2l vXk5yNpgWANNonEeBoxWI0vgn5XCJkJI1e+mF5iTfnHEYqZeSvRVPbiy5G/t/Xu6 RkGq26s2bsqgo1jFsDQ5PnDkrhdJ9pTl9AKr7GvWQPE1zJpROQzqhcRa35Foh1BJ 7MRyjX5IR5I+zjh9qtmkQWtWCHd3ESZcq/FXO8DWu/AvnE+gGgcK9Gtn9oA0ukd5 pSOi2wKFaQ3xbZiQ1wJLrQNJAjgJrizsz4F3OwSgUDBJnffQ7QenXnsvyOcVkhQD Bgf8DLZF6ruey/gfBwsUS2Ps4wDPg1Cix6grx+plnd2PJ/EzDZSsntJKwJIx+uP7 QkhlYyWxkcZU1c/eETo6LmWRgz8Ewy3cZCtjP6Y2PY5WU6q/UEoJTPWdXOtxKRJT d+hRR56xYkbYwrvp0cLH1DmTb4Hr+BEszPlt5U+vAHO3yLjqEfQ= =2Kdr -----END PGP SIGNATURE----- --jeef5soifo62kmrh--