kpatch: set LC_ALL=C explicitly when loading the patch module

kpatch checks the messages output by insmod to decide if loading failed
with -EBUSY (i.e. activeness safety check failed). It looks for
"Device or resource busy" message, but one cannot guarantee it is not
output in some other language.

Let us use LC_ALL=C to be sure.

Signed-off-by: Evgenii Shatokhin <eshatokhin@virtuozzo.com>
This commit is contained in:
Evgenii Shatokhin 2018-02-08 14:44:23 +03:00
parent 4ef38429ab
commit 2ac771fbe2

View File

@ -316,7 +316,7 @@ load_module () {
echo "loading patch module: $module"
local i=0
while true; do
out="$(insmod "$module" 2>&1)"
out="$(LC_ALL=C insmod "$module" 2>&1)"
[[ -z "$out" ]] && break
echo "$out" 1>&2
[[ ! "$out" =~ "Device or resource busy" ]] &&