fstests.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] common/module: fix patient module remover when module is not present
@ 2021-11-15 23:28 Luis Chamberlain
  2021-12-10 19:55 ` Luis Chamberlain
  0 siblings, 1 reply; 3+ messages in thread
From: Luis Chamberlain @ 2021-11-15 23:28 UTC (permalink / raw)
  To: fstests; +Cc: Luis Chamberlain

When module is not present and the open coded patient module
remover is called we'll end up in a loop which never ends.
Fix this.

I actually found this issue not in fstests, but when applying this
open coded solution to blktests. In fstest we tend to only call
module remove when we have a module loaded. blktests is different,
and so I immediately spotted the issue there.

Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
---
 common/module | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/common/module b/common/module
index ead0f881..6efab71d 100644
--- a/common/module
+++ b/common/module
@@ -180,6 +180,8 @@ _patient_rmmod()
 				continue
 			fi
 			let max_tries=$max_tries-1
+		else
+			break
 		fi
 	done
 
-- 
2.33.0


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

end of thread, other threads:[~2021-12-12 12:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-11-15 23:28 [PATCH] common/module: fix patient module remover when module is not present Luis Chamberlain
2021-12-10 19:55 ` Luis Chamberlain
2021-12-12 12:59   ` Eryu Guan

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).