[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] xen: fix: use WARN_ON instead of if condition followed by BUG.
- To: YANG LI <abaci-bugfix@xxxxxxxxxxxxxxxxx>
- From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
- Date: Wed, 30 Dec 2020 09:34:08 +0100
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ydfHFhm52oL5qGO40g1JepkxZy0WMgmVXyR+OgTq7XY=; b=d4I9u2asXKfYJQDt42QKD1ZVpihxe0U/pHAcL1EhZuyNKUvH1PmsHY+XfTTv8pCBWkWpokKvNlgoOfiOdvKN/pFP0YYevPfoJQCMLnVqjkRhtrPLwP93v++2K/dzRZvd5J7j/rqZgoEsm7t40VSWw7RanIH2MY2WFhS5KxqQQEqcaJLTRdDI8DPj9y//GIxJx1e1cxiC5x8r5u5eH7r/rfdZGrOQOgm2OKGeKvnmVpo8R2jYIMWa8kDN2rqm+o1RjHqmy9iriDm83PFxxBuA9YOIwbI+xp7PYVwfiRTsiVhJbXWGD9OFtvSEmKuoCQz72T3SlOZgDdBFSt17gal7jA==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bAiOA+OIMCITfAGCQB/M89otnnY03xPFDKU5RRLruD3z2eIgiI493R7VjzCSNUrcy4sBMhWELYmEd/cOW/pFvWaaCIyCzTBWdSdE0U9AWR+yGpY3Va1Sy0VpPjgAOgPSwTgOYNXj9nszsB1C/+VVx2mwiIahq7nW7LBXTvuFikFkrkVBqO2T7vnWy/7a5E8MJAKXaU78r2ojeGIrtTdKNW8gWI6AfCAokWBnKGYNK3444Ba6jTpCYh8hF1XWtYIOQfvcwTrXb2uXwd9rdpN7LCS1sA07o4+SG92GTm57avzlnqY8hAfGJb7qdH5PfvyMzL4asKEKqoenUmvcGR07GA==
- Authentication-results: esa6.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
- Cc: <boris.ostrovsky@xxxxxxxxxx>, <jgross@xxxxxxxx>, <sstabellini@xxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>, <linux-kernel@xxxxxxxxxxxxxxx>
- Delivery-date: Wed, 30 Dec 2020 08:34:34 +0000
- Ironport-sdr: rLyqQKk8jDa4D/UphsdpIgz8WSO46vsv/km5bg+ZxhL+Tfg1ULPuIc8q7xubeBYFK/2E75sGFx uj1Aj/J2X4ogFBE0GSS/JdtiOhGFrnx2hE0vfs4XzAVqiomwLDFXoz4uNNUAxNN3dBeBGntP4Z G0c37XrT/v/LBpjnqND+RTzpDrKKTNl1CTb2rx8HDDF5olaDjiVs4bIlucTp9S+e4Qfs68DdXt yqBMJLX/040be0CipRSef+cAU7xqcIAumxiKnlS49jyH96FWgcVisLLhC9obdr9c0lsX84B4Sn 8CQ=
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On Wed, Dec 30, 2020 at 02:38:06PM +0800, YANG LI wrote:
> Use WARN_ON instead of if condition followed by BUG in
> gnttab_batch_map() and gnttab_batch_copy().
But those are not equivalent as far as I'm aware. BUG will stop
execution, while WARN_ON will print a splat and continue executing.
If switching to WARN_ON is indeed fine it needs to be explained in the
commit message that returning to the caller(s) with
HYPERVISOR_grant_table_op having returned an error code is fine, and
that it's not going to create other issues, like memory corruption or
leaks.
Thanks, Roger.
|