Date: Fri, 13 Nov 2015 00:42:26 +0000 From: Eric Joyner <erj@freebsd.org> To: Steven Hartland <smh@freebsd.org>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r290708 - head/sys/dev/ixl Message-ID: <CA%2Bb0zg_4mgSxbVPkyke_11CRM0otdtJ36o03uqZSfvbS2FOKPA@mail.gmail.com> In-Reply-To: <201511120945.tAC9jZZk067057@repo.freebsd.org> References: <201511120945.tAC9jZZk067057@repo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
I guess r280043 got overwritten at some point? - Eric On Thu, Nov 12, 2015 at 1:45 AM Steven Hartland <smh@freebsd.org> wrote: > Author: smh > Date: Thu Nov 12 09:45:35 2015 > New Revision: 290708 > URL: https://svnweb.freebsd.org/changeset/base/290708 > > Log: > Fix ixl debug sysctls panic > > Remove the use of sbuf_data on drained sbufs from the debug sysctls: > * ixl_sysctl_hw_res_alloc > * ixl_sysctl_switch_config > > This prevents a kernel panic when accessing these values under a kernel > compiled with INVARIANTS. > > Sponsored by: Multiplay > > Modified: > head/sys/dev/ixl/if_ixl.c > > Modified: head/sys/dev/ixl/if_ixl.c > > ============================================================================== > --- head/sys/dev/ixl/if_ixl.c Thu Nov 12 09:20:10 2015 (r290707) > +++ head/sys/dev/ixl/if_ixl.c Thu Nov 12 09:45:35 2015 (r290708) > @@ -5119,17 +5119,9 @@ ixl_sysctl_hw_res_alloc(SYSCTL_HANDLER_A > } > > error = sbuf_finish(buf); > - if (error) { > - device_printf(dev, "Error finishing sbuf: %d\n", error); > - sbuf_delete(buf); > - return error; > - } > - > - error = sysctl_handle_string(oidp, sbuf_data(buf), sbuf_len(buf), > req); > - if (error) > - device_printf(dev, "sysctl error: %d\n", error); > sbuf_delete(buf); > - return error; > + > + return (error); > } > > /* > @@ -5236,15 +5228,6 @@ ixl_sysctl_switch_config(SYSCTL_HANDLER_ > sbuf_delete(nmbuf); > > error = sbuf_finish(buf); > - if (error) { > - device_printf(dev, "Error finishing sbuf: %d\n", error); > - sbuf_delete(buf); > - return error; > - } > - > - error = sysctl_handle_string(oidp, sbuf_data(buf), sbuf_len(buf), > req); > - if (error) > - device_printf(dev, "sysctl error: %d\n", error); > sbuf_delete(buf); > > return (error); > >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CA%2Bb0zg_4mgSxbVPkyke_11CRM0otdtJ36o03uqZSfvbS2FOKPA>