Date: Thu, 28 May 2020 08:20:17 +0000 (UTC) From: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= <royger@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r361580 - head/sys/dev/xen/control Message-ID: <202005280820.04S8KHsC076015@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: royger Date: Thu May 28 08:20:16 2020 New Revision: 361580 URL: https://svnweb.freebsd.org/changeset/base/361580 Log: xen/control: short circuit xctrl_on_watch_event on spurious event If there's no data to read from xenstore short-circuit xctrl_on_watch_event to return early, there's no reason to continue since the lack of data would prevent matching against any known event type. Sponsored by: Citrix Systems R&D MFC with: r352925 MFC after: 1 week Modified: head/sys/dev/xen/control/control.c Modified: head/sys/dev/xen/control/control.c ============================================================================== --- head/sys/dev/xen/control/control.c Thu May 28 08:19:13 2020 (r361579) +++ head/sys/dev/xen/control/control.c Thu May 28 08:20:16 2020 (r361580) @@ -360,7 +360,7 @@ xctrl_on_watch_event(struct xs_watch *watch, const cha error = xs_read(XST_NIL, "control", "shutdown", &result_len, (void **)&result); - if (error != 0) + if (error != 0 || result_len == 0) return; /* Acknowledge the request by writing back an empty string. */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202005280820.04S8KHsC076015>