From owner-freebsd-bugs@freebsd.org Wed May 30 17:48:07 2018 Return-Path: Delivered-To: freebsd-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 85D52FC9329 for ; Wed, 30 May 2018 17:48:07 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 0E6626F9F5 for ; Wed, 30 May 2018 17:48:07 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id BC504FC9328; Wed, 30 May 2018 17:48:06 +0000 (UTC) Delivered-To: bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 94C4FFC9327 for ; Wed, 30 May 2018 17:48:06 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.ysv.freebsd.org (mxrelay.ysv.freebsd.org [IPv6:2001:1900:2254:206a::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.ysv.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2AF476F9F3 for ; Wed, 30 May 2018 17:48:06 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.ysv.freebsd.org (Postfix) with ESMTPS id 6DFC118B6A for ; Wed, 30 May 2018 17:48:05 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id w4UHm5Pt046929 for ; Wed, 30 May 2018 17:48:05 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id w4UHm5WC046926 for bugs@FreeBSD.org; Wed, 30 May 2018 17:48:05 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 228612] if_setlladdr() invokes SIOCSIFFLAGS handlers in epoch context Date: Wed, 30 May 2018 17:48:05 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: markj@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 May 2018 17:48:07 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D228612 Bug ID: 228612 Summary: if_setlladdr() invokes SIOCSIFFLAGS handlers in epoch context Product: Base System Version: CURRENT Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: kern Assignee: bugs@FreeBSD.org Reporter: markj@FreeBSD.org I'm getting an INVARIANTS panic on boot on ThunderX. It occurs because if_setlladdr() may invoke the driver's SIOCSIFFLAGS handler in epoch contex= t, and this handler may sleep in general. lo0: link state changed to UP vnic0: link state changed to UP lagg0: link state changed to UP panic: malloc(M_WAITOK) in epoch context cpuid =3D 89 time =3D 1527701819 KDB: stack backtrace: db_trace_self() at db_trace_self_wrapper+0x28 pc =3D 0xffff000000667ca4 lr =3D 0xffff0000000db510 sp =3D 0xffff000148eae100 fp =3D 0xffff000148eae310 db_trace_self_wrapper() at vpanic+0x1a8 pc =3D 0xffff0000000db510 lr =3D 0xffff00000037a364 sp =3D 0xffff000148eae320 fp =3D 0xffff000148eae3d0 vpanic() at kassert_panic+0x1bc pc =3D 0xffff00000037a364 lr =3D 0xffff00000037a110 sp =3D 0xffff000148eae3e0 fp =3D 0xffff000148eae490 kassert_panic() at malloc_dbg+0x13c=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20 pc =3D 0xffff00000037a110 lr =3D 0xffff000000354dc0 sp =3D 0xffff000148eae4a0 fp =3D 0xffff000148eae4c0 malloc_dbg() at malloc+0x28 pc =3D 0xffff000000354dc0 lr =3D 0xffff000000354aa8 sp =3D 0xffff000148eae4d0 fp =3D 0xffff000148eae500 malloc() at nicvf_config_data_transfer+0xfc pc =3D 0xffff000000354aa8 lr =3D 0xffff0000006a7d50 sp =3D 0xffff000148eae510 fp =3D 0xffff000148eae5c0 nicvf_config_data_transfer() at nicvf_if_init_locked+0x14c pc =3D 0xffff0000006a7d50 lr =3D 0xffff0000006a6f00 sp =3D 0xffff000148eae5d0 fp =3D 0xffff000148eae620 nicvf_if_init_locked() at nicvf_if_ioctl+0x340 pc =3D 0xffff0000006a6f00 lr =3D 0xffff0000006a6bd0 sp =3D 0xffff000148eae630 fp =3D 0xffff000148eae670 nicvf_if_ioctl() at if_setlladdr+0x180 pc =3D 0xffff0000006a6bd0 lr =3D 0xffff00000046bc5c sp =3D 0xffff000148eae680 fp =3D 0xffff000148eae6e0 if_setlladdr() at lagg_ioctl+0xe20 pc =3D 0xffff00000046bc5c lr =3D 0xffff000148a8e6d4 sp =3D 0xffff000148eae6f0 fp =3D 0xffff000148eae7a0 lagg_ioctl() at ifioctl+0x7a8 pc =3D 0xffff000148a8e6d4 lr =3D 0xffff000000469bf8 sp =3D 0xffff000148eae7b0 fp =3D 0xffff000148eae860 ifioctl() at kern_ioctl+0x358 pc =3D 0xffff000000469bf8 lr =3D 0xffff0000003e39e0 sp =3D 0xffff000148eae870 fp =3D 0xffff000148eae8c0 kern_ioctl() at sys_ioctl+0x158 pc =3D 0xffff0000003e39e0 lr =3D 0xffff0000003e3638 sp =3D 0xffff000148eae8d0 fp =3D 0xffff000148eae9a0 sys_ioctl() at do_el0_sync+0x498 pc =3D 0xffff0000003e3638 lr =3D 0xffff000000683328 sp =3D 0xffff000148eae9b0 fp =3D 0xffff000148eaea70 do_el0_sync() at handle_el0_sync+0x74 pc =3D 0xffff000000683328 lr =3D 0xffff00000066a1f4 sp =3D 0xffff000148eaea80 fp =3D 0xffff000148eaeb90 handle_el0_sync() at 0x3a53c pc =3D 0xffff00000066a1f4 lr =3D 0x000000000003a53c sp =3D 0xffff000148eaeba0 fp =3D 0x0000ffffffffe410 --=20 You are receiving this mail because: You are the assignee for the bug.=