mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-19 10:53:58 +00:00
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)
This commit is contained in:
parent
97a5390e6d
commit
f09a089ee6
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=296114
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user