Date: Fri, 26 Feb 2016 20:47:09 +0000 (UTC) From: Andriy Voskoboinyk <avos@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r296114 - head/sys/net80211 Message-ID: <201602262047.u1QKl9KJ006795@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: avos Date: Fri Feb 26 20:47:08 2016 New Revision: 296114 URL: https://svnweb.freebsd.org/changeset/base/296114 Log: net80211: fix 'uma_zalloc_arg: zone "32" with non-sleepable locks held' when 'sysctl net.wlan.devices' is executed. PR: 207497 Submitted by: glebius Approved by: adrian (mentor) Modified: head/sys/net80211/ieee80211.c Modified: head/sys/net80211/ieee80211.c ============================================================================== --- head/sys/net80211/ieee80211.c Fri Feb 26 20:38:23 2016 (r296113) +++ head/sys/net80211/ieee80211.c Fri Feb 26 20:47:08 2016 (r296114) @@ -266,21 +266,24 @@ static int sysctl_ieee80211coms(SYSCTL_HANDLER_ARGS) { struct ieee80211com *ic; - struct sbuf *sb; + struct sbuf sb; char *sp; int error; - sb = sbuf_new_auto(); + error = sysctl_wire_old_buffer(req, 0); + if (error) + return (error); + sbuf_new_for_sysctl(&sb, NULL, 8, req); + sbuf_clear_flags(&sb, SBUF_INCLUDENUL); sp = ""; mtx_lock(&ic_list_mtx); LIST_FOREACH(ic, &ic_head, ic_next) { - sbuf_printf(sb, "%s%s", sp, ic->ic_name); + sbuf_printf(&sb, "%s%s", sp, ic->ic_name); sp = " "; } mtx_unlock(&ic_list_mtx); - sbuf_finish(sb); - error = SYSCTL_OUT(req, sbuf_data(sb), sbuf_len(sb) + 1); - sbuf_delete(sb); + error = sbuf_finish(&sb); + sbuf_delete(&sb); return (error); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201602262047.u1QKl9KJ006795>