VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   32 Branches   54 Tags
author: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com> 2015-08-11 19:22:24 -0300 committer: David Teigland <teigland@redhat.com> 2015-08-17 16:22:21 -0500 commit: acee4e527d5f069351f835602b23602d01de5e1f parent: ee44b4bc054afc586c92558a225055ef9fd25d17
Commit Summary:
dlm: replace BUG_ON with a less severe handling
Diffstat:
1 file changed, 4 insertions, 2 deletions
diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c
index 856d750be96b..4ea64e93e6b1 100644
--- a/fs/dlm/lowcomms.c
+++ b/fs/dlm/lowcomms.c
@@ -542,6 +542,10 @@ static int receive_from_sock(struct connection *con)
 		ret = -EAGAIN;
 		goto out_close;
 	}
+	if (con->nodeid == 0) {
+		ret = -EINVAL;
+		goto out_close;
+	}
 
 	if (con->rx_page == NULL) {
 		/*
@@ -582,8 +586,6 @@ static int receive_from_sock(struct connection *con)
 	else if (ret == len)
 		call_again_soon = 1;
 
-	BUG_ON(con->nodeid == 0);
-
 	cbuf_add(&con->cb, ret);
 	ret = dlm_process_incoming_buffer(con->nodeid,
 					  page_address(con->rx_page),