From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: Re: [PATCH] xen: credit2: fix spinlock irq-safety violation Date: Thu, 21 Sep 2017 02:29:12 +0200 Message-ID: <1505953752.3483.14.camel@citrix.com> References: <150578708843.32006.17195420852157192880.stgit@Solace.fritz.box> <68900559-7c07-0009-3a61-a6fe82ddd2b5@citrix.com> <3c1b015f-ad2a-9bc7-7414-3d51c13e15c1@citrix.com> <1505907844.3483.12.camel@citrix.com> <59C27426020000780017D649@prv-mh.provo.novell.com> <6facfc2d-c117-8e7c-6402-d5e30ef98cf2@citrix.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============4125131494142441034==" Return-path: Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dupMt-0007rE-1v for xen-devel@lists.xenproject.org; Thu, 21 Sep 2017 00:29:27 +0000 In-Reply-To: <6facfc2d-c117-8e7c-6402-d5e30ef98cf2@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" To: George Dunlap , Jan Beulich Cc: George Dunlap , xen-devel@lists.xenproject.org, Wei Liu , osstest service owner List-Id: xen-devel@lists.xenproject.org --===============4125131494142441034== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="=-r/CIEnfbHJtbfM25+VG9" --=-r/CIEnfbHJtbfM25+VG9 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, 2017-09-20 at 14:49 +0100, George Dunlap wrote: > On 09/20/2017 12:59 PM, Jan Beulich wrote: > > Hmm, killing the timer upfront is certainly fine, but is freeing > > the > > data before removing the element from the list safe not only > > currently, but also going forward? >=20 > I agree with Jan -- if you don't want to put the kill_timer() in the > critical section, put it beforehand; but don't free the structure > until > after the sdom struct has been removed from the list. >=20 In general, I agree, and so I'll do this. In this case, considering what list we are talking about, and what it is used for right now (i.e., only for debug dump!), there are no dependencies between these two operations. And in any scenario that I can anticipate, where such a dependency would come into being, the level of restructuring of the code that is necessary to use the list in any really useful way, would be significant, and there may be a few other cases where a similar dependency would also surface and become an issue, and that will probably lead us to consider/remember this code here as well. So, IOW, I wouldn't consider this a problem, in the specific case. But since the net effect of this patch and what George suggests is the same, and since I appreciate the value that it has, in principle, doing changes like these with this approach, I'm fine with killing before and freeing after the critical sections, and I'll send a patch for that Thanks and Regards, Dario --=20 <> (Raistlin Majere) ----------------------------------------------------------------- Dario Faggioli, Ph.D, http://about.me/dario.faggioli Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK) --=-r/CIEnfbHJtbfM25+VG9 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 iQIcBAABCAAGBQJZwwfZAAoJEBZCeImluHPuGbEQAMygkcwa9pDc5pztuw98sBBn uPgRtp1AF+mHcOCv9iQpCA69urWqU4B9qkoBP3JeWhMyZwwPo4CsA2v+ggD6lrb/ rskPLycmgtKL8wtj0mouxevlWOcLsgHUVDx3IRHGQl96ffz6/HfiQxuujotekjA3 1CZt1NPP0wZka7MKnIGR5IwZ6s3GR8TdaDnZbWXisn8jLxgqWrR5Pk7PN8JaCNVV 7lo+rgeSL7wVyDhHbHh2WgI4yEPHdcBgcNDhZr9wjZvJuEs1QyV7ZNoZ5TkAa+/t GRBcH4n41XGSORzDCyi0cvhxS0QmK/G5a5Uup1ZmMGXJiFO6hgU/iKzg/U9kxLtR LaInOPOgukp5BVyBXfNJ5AddvddudX5JxabnTzrrlMNi9tww4UZ8E2AIFSY6AITJ obXwM4J9yGb7Yr9Lxwxc/BnM7cVPBYByNPPJEYgFFMyAayp6rz17KKVockpdz/f9 wSaZOxxOcrEKydv9DsYScnzXr8Ai7pvwuwG1o5XgGZXd6ZSvAdKLJbcqQmdbk1mD aUrWUK3cH+WDKVUy7F2BJD2gPMAEZHKPAYkuboGHxOi67/eCbPoMe+4UruBhyhyt mF/oX9+fPk1ESnbN4QPtIpDwuJk98oM0sL6XBp8AF4qxWEZm5Kiygiuu4liJ/jNw S95rzMGYCJH8LDWioMoz =9WRT -----END PGP SIGNATURE----- --=-r/CIEnfbHJtbfM25+VG9-- --===============4125131494142441034== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KWGVuLWRldmVs IG1haWxpbmcgbGlzdApYZW4tZGV2ZWxAbGlzdHMueGVuLm9yZwpodHRwczovL2xpc3RzLnhlbi5v cmcveGVuLWRldmVsCg== --===============4125131494142441034==--