* [PATCH] 9p: null terminate fs driver options list
@ 2020-07-09 17:58 P J P
2020-07-10 1:42 ` Li Qiang
2020-07-10 11:39 ` Greg Kurz
0 siblings, 2 replies; 3+ messages in thread
From: P J P @ 2020-07-09 17:58 UTC (permalink / raw)
To: Greg Kurz; +Cc: QEMU Developers, Prasad J Pandit
From: Prasad J Pandit <pjp@fedoraproject.org>
NULL terminate fs driver options' list, validate_opt() looks for
a null entry to terminate the loop.
Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>
---
fsdev/qemu-fsdev.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/fsdev/qemu-fsdev.c b/fsdev/qemu-fsdev.c
index a9e069c0c7..3da64e9f72 100644
--- a/fsdev/qemu-fsdev.c
+++ b/fsdev/qemu-fsdev.c
@@ -78,6 +78,7 @@ static FsDriverTable FsDrivers[] = {
"throttling.iops-read-max-length",
"throttling.iops-write-max-length",
"throttling.iops-size",
+ NULL
},
},
{
@@ -85,6 +86,7 @@ static FsDriverTable FsDrivers[] = {
.ops = &synth_ops,
.opts = (const char * []) {
COMMON_FS_DRIVER_OPTIONS,
+ NULL
},
},
{
@@ -95,6 +97,7 @@ static FsDriverTable FsDrivers[] = {
"socket",
"sock_fd",
"writeout",
+ NULL
},
},
};
--
2.26.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] 9p: null terminate fs driver options list
2020-07-09 17:58 [PATCH] 9p: null terminate fs driver options list P J P
@ 2020-07-10 1:42 ` Li Qiang
2020-07-10 11:39 ` Greg Kurz
1 sibling, 0 replies; 3+ messages in thread
From: Li Qiang @ 2020-07-10 1:42 UTC (permalink / raw)
To: P J P; +Cc: Prasad J Pandit, Greg Kurz, QEMU Developers
P J P <ppandit@redhat.com> 于2020年7月10日周五 上午2:01写道:
>
> From: Prasad J Pandit <pjp@fedoraproject.org>
>
> NULL terminate fs driver options' list, validate_opt() looks for
> a null entry to terminate the loop.
>
> Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>
Reviewed-by: Li Qiang <liq3ea@gmail.com>
> ---
> fsdev/qemu-fsdev.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/fsdev/qemu-fsdev.c b/fsdev/qemu-fsdev.c
> index a9e069c0c7..3da64e9f72 100644
> --- a/fsdev/qemu-fsdev.c
> +++ b/fsdev/qemu-fsdev.c
> @@ -78,6 +78,7 @@ static FsDriverTable FsDrivers[] = {
> "throttling.iops-read-max-length",
> "throttling.iops-write-max-length",
> "throttling.iops-size",
> + NULL
> },
> },
> {
> @@ -85,6 +86,7 @@ static FsDriverTable FsDrivers[] = {
> .ops = &synth_ops,
> .opts = (const char * []) {
> COMMON_FS_DRIVER_OPTIONS,
> + NULL
> },
> },
> {
> @@ -95,6 +97,7 @@ static FsDriverTable FsDrivers[] = {
> "socket",
> "sock_fd",
> "writeout",
> + NULL
> },
> },
> };
> --
> 2.26.2
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] 9p: null terminate fs driver options list
2020-07-09 17:58 [PATCH] 9p: null terminate fs driver options list P J P
2020-07-10 1:42 ` Li Qiang
@ 2020-07-10 11:39 ` Greg Kurz
1 sibling, 0 replies; 3+ messages in thread
From: Greg Kurz @ 2020-07-10 11:39 UTC (permalink / raw)
To: P J P; +Cc: QEMU Developers, Prasad J Pandit
On Thu, 9 Jul 2020 23:28:48 +0530
P J P <ppandit@redhat.com> wrote:
> From: Prasad J Pandit <pjp@fedoraproject.org>
>
> NULL terminate fs driver options' list, validate_opt() looks for
> a null entry to terminate the loop.
>
Good catch ! And this never bit us before because opt ends up
pointing to some valid memory containing zeroes... by luck :)
I've added a Fixes tag and applied this to the 9p-fix branch.
https://github.com/gkurz/qemu/commits/9p-fix
Cheers,
--
Greg
> Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>
> ---
> fsdev/qemu-fsdev.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/fsdev/qemu-fsdev.c b/fsdev/qemu-fsdev.c
> index a9e069c0c7..3da64e9f72 100644
> --- a/fsdev/qemu-fsdev.c
> +++ b/fsdev/qemu-fsdev.c
> @@ -78,6 +78,7 @@ static FsDriverTable FsDrivers[] = {
> "throttling.iops-read-max-length",
> "throttling.iops-write-max-length",
> "throttling.iops-size",
> + NULL
> },
> },
> {
> @@ -85,6 +86,7 @@ static FsDriverTable FsDrivers[] = {
> .ops = &synth_ops,
> .opts = (const char * []) {
> COMMON_FS_DRIVER_OPTIONS,
> + NULL
> },
> },
> {
> @@ -95,6 +97,7 @@ static FsDriverTable FsDrivers[] = {
> "socket",
> "sock_fd",
> "writeout",
> + NULL
> },
> },
> };
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-07-10 11:40 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-09 17:58 [PATCH] 9p: null terminate fs driver options list P J P
2020-07-10 1:42 ` Li Qiang
2020-07-10 11:39 ` Greg Kurz
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.