From owner-svn-src-head@FreeBSD.ORG Thu Oct 21 19:08:29 2010 Return-Path: Delivered-To: svn-src-head@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5393D106566B; Thu, 21 Oct 2010 19:08:29 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from tarsier.geekcn.org (tarsier.geekcn.org [IPv6:2001:470:a803::1]) by mx1.freebsd.org (Postfix) with ESMTP id BE9108FC0C; Thu, 21 Oct 2010 19:08:28 +0000 (UTC) Received: from mail.geekcn.org (tarsier.geekcn.org [211.166.10.233]) by tarsier.geekcn.org (Postfix) with ESMTP id 5E197A7E65A; Fri, 22 Oct 2010 03:08:26 +0800 (CST) X-Virus-Scanned: amavisd-new at geekcn.org Received: from tarsier.geekcn.org ([211.166.10.233]) by mail.geekcn.org (mail.geekcn.org [211.166.10.233]) (amavisd-new, port 10024) with LMTP id ME7bAtVfFzo4; Fri, 22 Oct 2010 03:08:20 +0800 (CST) Received: from delta.delphij.net (drawbridge.ixsystems.com [206.40.55.65]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tarsier.geekcn.org (Postfix) with ESMTPSA id 3BF18A7E663; Fri, 22 Oct 2010 03:08:16 +0800 (CST) DomainKey-Signature: a=rsa-sha1; s=default; d=delphij.net; c=nofws; q=dns; h=message-id:date:from:reply-to:organization:user-agent: mime-version:to:cc:subject:references:in-reply-to: x-enigmail-version:openpgp:content-type; b=v7VFcPZ0eNNpvcNNrNOShVfm1f6Jmud5h9pqYo7i/dz/tHVbavXAahRdNrNZzCnFp X+rD1NPCtWJc2rnW1ZPdQ== Message-ID: <4CC08F9C.5010804@delphij.net> Date: Thu, 21 Oct 2010 12:08:12 -0700 From: Xin LI Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.1.14) Gecko/20101020 Thunderbird/3.0.9 ThunderBrowse/3.3.2 MIME-Version: 1.0 To: John Baldwin References: <201010210857.o9L8vPVQ084307@svn.freebsd.org> <201010210746.41227.jhb@freebsd.org> In-Reply-To: <201010210746.41227.jhb@freebsd.org> X-Enigmail-Version: 1.0.1 OpenPGP: id=3FCA37C1; url=http://www.delphij.net/delphij.asc Content-Type: multipart/mixed; boundary="------------080107040006070001050407" Cc: svn-src-head@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, src-committers@FreeBSD.ORG, Xin LI Subject: Re: svn commit: r214125 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: d@delphij.net 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: Thu, 21 Oct 2010 19:08:29 -0000 This is a multi-part message in MIME format. --------------080107040006070001050407 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 On 10/21/10 04:46, John Baldwin wrote: > On Thursday, October 21, 2010 4:57:25 am Xin LI wrote: >> Author: delphij >> Date: Thu Oct 21 08:57:25 2010 >> New Revision: 214125 >> URL: http://svn.freebsd.org/changeset/base/214125 >> >> Log: >> In syscall_module_handler(): all switch branches return, remove >> unreached code as pointed out in a Chinese forum [1]. >> >> [1] http://www.freebsdchina.org/forum/viewtopic.php?t=50619 >> >> Pointed out by: btw616 >> MFC after: 1 month > > I think this exposes a bug though in that the default case doesn't pass > through to chainevh. The default case should look more like the removed code > (except returning EOPNOTSUPP instead of 0 if there is no chainevh). Hmm... It sounds reasonable in theory (so that modules can handle events other than MOD_LOAD/UNLOAD) at least, while I don't think it's really being used anywhere. Will the attached patch look reasonable? (If data->chainevh is NULL then operation is not supported, if not then delegate to the module). Cheers, - -- Xin LI http://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (FreeBSD) iQEcBAEBCAAGBQJMwI+cAAoJEATO+BI/yjfBADUH/21dtdgSziij8hNi8ef5xOZH QMbGRoHNUREVfuAnAevGNDotSonaRv+VEs5k9raRqqYFdtst6KzNjVQuumJsskmq +6j7rSPXQvAmgEf6JgEZmjU/WzRbs4lozMjUOx0TW6ZSTtiXq+PSvmMe7q9iydiT YKOj8E/itVFjKY2qMGNkAQ893qzIWvptDR9QGJP+m+8usTnYvAlk8vQw3XhfR/ws MNE726rDNwD2sblH2IZI0dt/xy8i6mD5Ef1aM4KEkeussBjGlLAktSS6qFB71lql JpGC9SCelhJRci6gLTvAbAyIe9hoFf8C7P+AbFXgVNMQxYWIHSzQr5BktwxSpc0= =C6jc -----END PGP SIGNATURE----- --------------080107040006070001050407 Content-Type: text/plain; name="kern_syscalls.c.diff" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="kern_syscalls.c.diff" SW5kZXg6IHN5cy9rZXJuL2tlcm5fc3lzY2FsbHMuYwo9PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBzeXMv a2Vybi9rZXJuX3N5c2NhbGxzLmMJKHJldmlzaW9uIDIxNDE0NikKKysrIHN5cy9rZXJuL2tl cm5fc3lzY2FsbHMuYwkod29ya2luZyBjb3B5KQpAQCAtMTgxLDcgKzE4MSw5IEBACiAJCWVy cm9yID0gc3lzY2FsbF9kZXJlZ2lzdGVyKGRhdGEtPm9mZnNldCwgJmRhdGEtPm9sZF9zeXNl bnQpOwogCQlyZXR1cm4gKGVycm9yKTsKIAlkZWZhdWx0OgotCQlyZXR1cm4gRU9QTk9UU1VQ UDsKKwkJaWYgKGRhdGEtPmNoYWluZXZoKQorCQkJcmV0dXJuIChkYXRhLT5jaGFpbmV2aCht b2QsIHdoYXQsIGRhdGEtPmNoYWluYXJnKSk7CisJCXJldHVybiAoRU9QTk9UU1VQUCk7CiAJ fQogCiAJLyogTk9UUkVBQ0hFRCAqLwo= --------------080107040006070001050407--