* [LTP] [PATCH v2] is_fuse: return zore if fs_type is NULL
@ 2018-01-23 9:46 Li Wang
2018-01-23 9:56 ` Jan Stancek
0 siblings, 1 reply; 2+ messages in thread
From: Li Wang @ 2018-01-23 9:46 UTC (permalink / raw)
To: ltp
This commmit 28507e514c(safe_mount: Do not try mount() syscall for FUSE fs)
involves FUSE fs check in safe_mount(), but we'd better guarantee the "fs_type"
is legal to check in is_fuse() function otherwise system will kill the program.
cmdline="fanotify06"
contacts=""
analysis=exit
<<<test_output>>>
tst_test.c:980: INFO: Timeout per run is 0h 10m 00s
tst_test.c:1025: BROK: Test killed by SIGSEGV!
Signed-off-by: Li Wang <liwang@redhat.com>
---
lib/safe_macros.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/lib/safe_macros.c b/lib/safe_macros.c
index c48e436..abdeca0 100644
--- a/lib/safe_macros.c
+++ b/lib/safe_macros.c
@@ -708,6 +708,9 @@ static int is_fuse(const char *fs_type)
{
unsigned int i;
+ if (!fs_type)
+ return 0;
+
for (i = 0; i < ARRAY_SIZE(fuse_fs_types); i++) {
if (!strcmp(fuse_fs_types[i], fs_type))
return 1;
--
2.9.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [LTP] [PATCH v2] is_fuse: return zore if fs_type is NULL
2018-01-23 9:46 [LTP] [PATCH v2] is_fuse: return zore if fs_type is NULL Li Wang
@ 2018-01-23 9:56 ` Jan Stancek
0 siblings, 0 replies; 2+ messages in thread
From: Jan Stancek @ 2018-01-23 9:56 UTC (permalink / raw)
To: ltp
----- Original Message -----
> This commmit 28507e514c(safe_mount: Do not try mount() syscall for FUSE fs)
> involves FUSE fs check in safe_mount(), but we'd better guarantee the
> "fs_type"
> is legal to check in is_fuse() function otherwise system will kill the
> program.
>
> cmdline="fanotify06"
> contacts=""
> analysis=exit
> <<<test_output>>>
> tst_test.c:980: INFO: Timeout per run is 0h 10m 00s
> tst_test.c:1025: BROK: Test killed by SIGSEGV!
>
> Signed-off-by: Li Wang <liwang@redhat.com>
Pushed with small tweak to commit message.
Regards,
Jan
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-01-23 9:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-23 9:46 [LTP] [PATCH v2] is_fuse: return zore if fs_type is NULL Li Wang
2018-01-23 9:56 ` Jan Stancek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox