netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Convert BUG_ON to WARN_ON in bond_options.c
@ 2017-06-21 18:02 Michael J Dilmore
  2017-06-21 18:33 ` Jay Vosburgh
  0 siblings, 1 reply; 13+ messages in thread
From: Michael J Dilmore @ 2017-06-21 18:02 UTC (permalink / raw)
  To: j.vosburgh; +Cc: vfalico, =andy, netdev, linux-kernel, joe, Michael J Dilmore

The function below contains a BUG_ON where no active slave is detected. The patch
converts this to a WARN_ON to avoid crashing the kernel.

Signed-off-by: Michael J Dilmore <michael.j.dilmore@gmail.com>
---
 drivers/net/bonding/bond_options.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/bonding/bond_options.c b/drivers/net/bonding/bond_options.c
index 1bcbb89..c4b4791 100644
--- a/drivers/net/bonding/bond_options.c
+++ b/drivers/net/bonding/bond_options.c
@@ -778,7 +778,7 @@ static int bond_option_active_slave_set(struct bonding *bond,
 		struct slave *old_active = rtnl_dereference(bond->curr_active_slave);
 		struct slave *new_active = bond_slave_get_rtnl(slave_dev);
 
-		BUG_ON(!new_active);
+		WARN_ON(!new_active);
 
 		if (new_active == old_active) {
 			/* do nothing */
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2017-06-22  8:14 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-21 18:02 [PATCH] Convert BUG_ON to WARN_ON in bond_options.c Michael J Dilmore
2017-06-21 18:33 ` Jay Vosburgh
2017-06-21 21:35   ` Michael D
2017-06-21 21:36     ` David Miller
2017-06-21 21:41       ` Michael D
2017-06-21 21:56         ` David Miller
2017-06-21 22:27           ` Michael J Dilmore
2017-06-21 22:39             ` Jay Vosburgh
2017-06-21 23:04               ` Michael J Dilmore
2017-06-22  8:04                 ` Michal Kubecek
2017-06-22  8:14               ` Bjørn Mork
2017-06-21 22:31           ` Jay Vosburgh
2017-06-21 21:57         ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).