[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190319025950.18311-1-pakki001@umn.edu>
Date: Mon, 18 Mar 2019 21:59:49 -0500
From: Aditya Pakki <pakki001@....edu>
To: pakki001@....edu
Cc: kjlu@....edu, Jan Kara <jack@...e.com>,
linux-kernel@...r.kernel.org
Subject: [PATCH] udf: Fix to check the return value of load_nls
load_nls may fail and return an error message. The patch checks
for such a scenario and passes the error upstream.
Signed-off-by: Aditya Pakki <pakki001@....edu>
---
fs/udf/super.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/fs/udf/super.c b/fs/udf/super.c
index ffd8038ff728..1a38271de6d9 100644
--- a/fs/udf/super.c
+++ b/fs/udf/super.c
@@ -573,6 +573,8 @@ static int udf_parse_options(char *options, struct udf_options *uopt,
if (uopt->nls_map)
unload_nls(uopt->nls_map);
uopt->nls_map = load_nls(args[0].from);
+ if (!uopt->nls_map)
+ return 0;
uopt->flags |= (1 << UDF_FLAG_NLS_MAP);
}
break;
--
2.17.1
Powered by blists - more mailing lists