Date: Thu, 21 Oct 2010 16:03:59 -0400 From: John Baldwin <jhb@freebsd.org> To: d@delphij.net Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Xin LI <delphij@freebsd.org> Subject: Re: svn commit: r214125 - head/sys/kern Message-ID: <201010211604.00120.jhb@freebsd.org> In-Reply-To: <4CC08F9C.5010804@delphij.net> References: <201010210857.o9L8vPVQ084307@svn.freebsd.org> <201010210746.41227.jhb@freebsd.org> <4CC08F9C.5010804@delphij.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thursday, October 21, 2010 3:08:12 pm Xin LI wrote: > 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 <btw s qq com> > >> 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. Yes, I agree it probably isn't used, but it'd be a weird surprise if someone tried to make use of it in the future for MOD_QUIESCE or the like. > Will the attached patch look reasonable? (If data->chainevh is NULL > then operation is not supported, if not then delegate to the module). Yes, I think this is fine. -- John Baldwin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201010211604.00120.jhb>