nbd: Fix overflow return value
PATCH 1/1 nbd: Fix overflow return value
The value of reply.error should be the type unsigned int.
--- nbd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
nbd.c +1 -1
@@ -1295,7 +1295,7 @@ static void nbd_trip(void *opaque)default :LOG ("invalid request type (%u) received" , request.type); invalid_request: - reply.error = -EINVAL ; + reply.error =EINVAL ; error_reply:if (nbd_co_send_reply (req, &reply,0 ) <0 ) { goto out;
Signature · 1 line
1.8.5
Quoted 23 lines · Yik Fang
The value of reply.error should be the type unsigned int.
Signed-off-by Yik Fang <[email protected]>--- nbd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)nbd.c +1
-1@@ -1295,7 +1295,7 @@ static void nbd_trip(void *opaque)default :LOG ("invalid request type (%u) received" , request.type); invalid_request: - reply.error = -EINVAL ; + reply.error =EINVAL ; error_reply:if (nbd_co_send_reply (req, &reply,0 ) <0 ) { goto out;Signature · 1 line
1.8.5
PATCH 1/1 nbd: Fix overflow return value
In reply to Yik FangPING
The value of reply.error should be the type unsigned int.
--- nbd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
nbd.c +1 -1
@@ -1295,7 +1295,7 @@ static void nbd_trip(void *opaque)default :LOG ("invalid request type (%u) received" , request.type); invalid_request: - reply.error = -EINVAL ; + reply.error =EINVAL ; error_reply:if (nbd_co_send_reply (req, &reply,0 ) <0 ) { goto out;
-- 1.8.5
Quoted 1 line · Fangyi (C)
PING
Please drop this line, it doesn't belong to the commit message.
You copied a bunch of people, but forgot the maintainer:
$ scripts/get_maintainer.pl -f nbd.c Paolo Bonzini <[email protected]> (odd fixer:Network Block Dev...)
I fixed that for you.
Quoted 21 lines
The value of reply.error should be the type unsigned int.
Signed-off-by Yik Fang <[email protected]>--- nbd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)nbd.c +1
-2@@ -1295,7 +1295,7 @@ static void nbd_trip(void *opaque)default :LOG ("invalid request type (%u) received" , request.type); invalid_request: - reply.error = -EINVAL ; + reply.error =EINVAL ; error_reply:if (nbd_co_send_reply (req, &reply,0 ) <0 ) { goto out; -- 1.8.5
Thanks to Markus for your help!
Quoted 26 lines · Fangyi (C)
PING
The value of reply.error should be the type unsigned int.Signed-off-by Yik Fang <[email protected]>--- nbd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)nbd.c +1
-2@@ -1295,7 +1295,7 @@ static void nbd_trip(void *opaque)default :LOG ("invalid request type (%u) received" , request.type); invalid_request: - reply.error = -EINVAL ; + reply.error =EINVAL ; error_reply:if (nbd_co_send_reply (req, &reply,0 ) <0 ) { goto out; -- 1.8.5
Paolo,
Can you have a look at this patch, and give me some advices?
Regards,
Yik Fang
-------- 转发的消息 --------
主题: Re: [Qemu-devel] [PATCH] nbd: Fix overflow return value 日期: Mon, 9 Mar 2015 10:16:07 +0800
发件人: Yik Fang <[email protected]>
收件人: [email protected], [email protected]
抄送: [email protected]
Thanks to Markus for your help!
Quoted 26 lines · Fangyi (C)
PING
The value of reply.error should be the type unsigned int.Signed-off-by Yik Fang <[email protected]>--- nbd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)nbd.c +1
-2@@ -1295,7 +1295,7 @@ static void nbd_trip(void *opaque)default :LOG ("invalid request type (%u) received" , request.type); invalid_request: - reply.error = -EINVAL ; + reply.error =EINVAL ; error_reply:if (nbd_co_send_reply (req, &reply,0 ) <0 ) { goto out; -- 1.8.5
Quoted 13 lines · Yik Fang
The value of reply.error should be the type unsigned int.
Signed-off-by Yik Fang <[email protected]>--- nbd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)nbd.c +0
-0
nbd.c static void nbd_trip(void *opaque) · line 1301
Quoted 8 lines
nbd.c +1
-1@@ -1295,7 +1295,7 @@ static void nbd_trip(void *opaque)default :LOG ("invalid request type (%u) received" , request.type); invalid_request: - reply.error = -EINVAL ; + reply.error =EINVAL ; error_reply:if (nbd_co_send_reply (req, &reply,0 ) <0 ) { goto out;
Applied to my local branch, thanks.
Paolo