[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v8 02/10] scripts: add coccinelle script to use auto propagated errp


  • To: Markus Armbruster <armbru@xxxxxxxxxx>
  • From: Vladimir Sementsov-Ogievskiy <vsementsov@xxxxxxxxxxxxx>
  • Date: Wed, 11 Mar 2020 12:49:49 +0300
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=virtuozzo.com; dmarc=pass action=none header.from=virtuozzo.com; dkim=pass header.d=virtuozzo.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=Ofjt0ha8AfP+wvy64SB17mehHoXwEqc0n17Nmn4KwbE=; b=i3lBfujImRYkKW7xPRYtvnYgLKL/kKw94hn/RDV0SHSVmjxrQfv+DGcqP8vVOSaJSlr6MKSfKvSAartZDYeyrdgHEZObve2xPiKD8WUwy3fsdduGbd0KuA+CX+iMQPrigwxCcID0P3Ue+/somHd1dBZebn6Zww6w2gOR/kAYgO5zqzk78wd1fg/OVJ+eTA4GAneZmMTe7ok5W19muG807sLUmICvejkkZcXXbIJVUBApvWvB41L9Dh5ur7sGnco4nSSU46/XwCLgI8wOnnpDWDbZt0bdqh9m97EFqlyYgWSKzLX2mMo8z5feryasOae6nZ9BaGCFHyX+86UI0Xdgig==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nk9hPfwwVlF6N2r3+DB5zD8AKO/kaH6z6tQUplBcB7i9t1Icd8tmmNR7jI0g/pWuIfnn71hTZwvSUgVb5i9yvJFimFab48xxUQAdeczmc/QX3EMvKkrE+BtkmnujTmHOt+qc5RUthlUqU9YfjZjVPueP9pKWcOsQHeEu65JS82+0fo0Y0HADwTHITfLtcNIWGxH/lPu9IdXHHeQGmVrE5s19RbM5pUP9LjwTZCxiZ2GY+HegyE4f2cS0IZKi7K9J8l6oCKoLJAgOB+CoL7udCyHgxNB1vmnZNdqlDrDsV7sMDwxf5slD/XBypfhnBRNWoP7SbKlFzXGASkLJdJAgAw==
  • Authentication-results: spf=none (sender IP is ) smtp.mailfrom=vsementsov@xxxxxxxxxxxxx;
  • Cc: Kevin Wolf <kwolf@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, qemu-block@xxxxxxxxxx, Paul Durrant <paul@xxxxxxx>, Philippe Mathieu-Daudé <philmd@xxxxxxxxxx>, Christian Schoenebeck <qemu_oss@xxxxxxxxxxxxx>, Michael Roth <mdroth@xxxxxxxxxxxxxxxxxx>, qemu-devel@xxxxxxxxxx, Greg Kurz <groug@xxxxxxxx>, Gerd Hoffmann <kraxel@xxxxxxxxxx>, Stefan Hajnoczi <stefanha@xxxxxxxxxx>, Anthony Perard <anthony.perard@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx, Max Reitz <mreitz@xxxxxxxxxx>, Laszlo Ersek <lersek@xxxxxxxxxx>, Stefan Berger <stefanb@xxxxxxxxxxxxx>
  • Delivery-date: Wed, 11 Mar 2020 09:49:59 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

11.03.2020 12:33, Markus Armbruster wrote:
Vladimir Sementsov-Ogievskiy <vsementsov@xxxxxxxxxxxxx> writes:

09.03.2020 12:56, Markus Armbruster wrote:
+
+// Convert error clearing functions
Suggest: Ensure @local_err is cleared on free

But there is no local_err after conversion

True.  Hmm.  What about this:

      // Convert calls to error_free(), possibly indirect
      // In addition to replacing @local_err by *errp, we have to clear *errp
      // to avoid use-after-free in the automatic error propagation.


OK

+(
+-    error_free(local_err);
++    error_free_errp(errp);
+|
+-    error_report_err(local_err);
++    error_report_errp(errp);
+|
+-    error_reportf_err(local_err, args);
++    error_reportf_errp(errp, args);
+|
+-    warn_report_err(local_err);
++    warn_report_errp(errp);
+|
+-    warn_reportf_err(local_err, args);



--
Best regards,
Vladimir

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.