From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: Re: [PATCH v3] x86: correct socket_cpumask allocation Date: Fri, 10 Jul 2015 17:33:05 +0200 Message-ID: <1436542385.22672.431.camel@citrix.com> References: <1436451837-26171-1-git-send-email-chao.p.peng@linux.intel.com> <1436538580.22672.420.camel@citrix.com> <559FDB1A.8030402@citrix.com> <1436540235.22672.425.camel@citrix.com> <559FFD3F020000780008F9D5@mail.emea.novell.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============9143780945824847695==" Return-path: In-Reply-To: <559FFD3F020000780008F9D5@mail.emea.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich Cc: Chao Peng , boris.ostrovsky@oracle.com, xen-devel@lists.xen.org, keir@xen.org, Andrew Cooper List-Id: xen-devel@lists.xenproject.org --===============9143780945824847695== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-HRPuuGblV+H8GloxRsaY" --=-HRPuuGblV+H8GloxRsaY Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, 2015-07-10 at 16:13 +0100, Jan Beulich wrote: > >>> On 10.07.15 at 16:57, wrote: > > ... > > (XEN) Preparing system for ACPI S5 state. > > (XEN) Disabling non-boot CPUs ... > > (XEN) Broke affinity for irq 9 > > (XEN) cpu=3D1 cpu_to_socket=3D4294967295 > > (XEN) ----[ Xen-4.6-unstable x86_64 debug=3Dy Tainted: C ]---- > > (XEN) CPU: 0 > > (XEN) RIP: e008:[] cpu_smpboot_free+0x43/0x28b > > ... > >=20 > > I.e., it looks like phys_proc_id has already been reset to > > XEN_INVALID_SOCKET_ID, as we're kind-of racing with > > remove_siblinginfo(). >=20 > Right. We have >=20 > cpu_down() > stop_machine_run(take_cpu_down, ...) > notifier_call_chain(&cpu_chain, CPU_DYING, ...) > __cpu_disable() > remove_siblinginfo() > __cpu_die() > notifier_call_chain(&cpu_chain, CPU_DEAD, ...) > cpu_smpboot_free() >=20 > I.e. a clear use-after-invalidate. >=20 Exactly. I don't have a box with CAT, but on one, I expect similar problems to happen in: psr_cpu_fini() cat_cpu_fini() --> unsigned int socket =3D cpu_to_socket(cpu); as that also runs from CPU_DEAD. :-/ I guess this haven't seen any "let's shut the host down" kind of testing... Dario --=20 <> (Raistlin Majere) ----------------------------------------------------------------- Dario Faggioli, Ph.D, http://about.me/dario.faggioli Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK) --=-HRPuuGblV+H8GloxRsaY Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEABECAAYFAlWf5bkACgkQk4XaBE3IOsTUvwCeOhA6z/VEiuj4pQhkkkpCYM0Z aSMAnj/bLkpGT4dlYF9ozEQWIkb6bRp6 =RcyA -----END PGP SIGNATURE----- --=-HRPuuGblV+H8GloxRsaY-- --===============9143780945824847695== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --===============9143780945824847695==--