lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Wed, 25 Jan 2017 16:57:09 +0000
From:   Stephen Hemminger <sthemmin@...rosoft.com>
To:     Vitaly Kuznetsov <vkuznets@...hat.com>,
        "devel@...uxdriverproject.org" <devel@...uxdriverproject.org>
CC:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "KY Srinivasan" <kys@...rosoft.com>,
        Haiyang Zhang <haiyangz@...rosoft.com>
Subject: RE: [PATCH] Drivers: hv: balloon: add a comment explaining fall
 through in hv_memory_notifier()

Simpe /* fallthrough */ is enough

-----Original Message-----
From: Vitaly Kuznetsov [mailto:vkuznets@...hat.com] 
Sent: Wednesday, January 25, 2017 8:27 AM
To: devel@...uxdriverproject.org
Cc: linux-kernel@...r.kernel.org; KY Srinivasan <kys@...rosoft.com>; Haiyang Zhang <haiyangz@...rosoft.com>; Stephen Hemminger <sthemmin@...rosoft.com>
Subject: [PATCH] Drivers: hv: balloon: add a comment explaining fall through in hv_memory_notifier()

Coverity scan gives a warning when there is fall through in a switch without a comment.

Reported-by: Stephen Hemminger <sthemmin@...rosoft.com>
Signed-off-by: Vitaly Kuznetsov <vkuznets@...hat.com>
---
 drivers/hv/hv_balloon.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/hv/hv_balloon.c b/drivers/hv/hv_balloon.c index 14c3dc4..7e2479f 100644
--- a/drivers/hv/hv_balloon.c
+++ b/drivers/hv/hv_balloon.c
@@ -587,6 +587,12 @@ static int hv_memory_notifier(struct notifier_block *nb, unsigned long val,
 		spin_lock_irqsave(&dm_device.ha_lock, flags);
 		dm_device.num_pages_onlined += mem->nr_pages;
 		spin_unlock_irqrestore(&dm_device.ha_lock, flags);
+		/*
+		 * Fall through - ol_waitevent needs to be completed to unblock
+		 * hv_mem_hot_add() allowing it to process next requests
+		 * regardless of the result of if we were able to online this
+		 * block.
+		 */
 	case MEM_CANCEL_ONLINE:
 		if (dm_device.ha_waiting) {
 			dm_device.ha_waiting = false;
--
2.9.3

Powered by blists - more mailing lists