[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 2/2] iotests: Send the correct fd in socket_scm_
From: |
Kevin Wolf |
Subject: |
Re: [Qemu-devel] [PATCH 2/2] iotests: Send the correct fd in socket_scm_helper |
Date: |
Fri, 12 Sep 2014 10:31:17 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
Am 12.09.2014 um 09:04 hat Markus Armbruster geschrieben:
> Stratos Psomadakis <address@hidden> writes:
>
> > Make sure to pass the correct fd via SCM_RIGHTS in socket_scm_helper.c
> > (i.e. fd_to_send, not socket-fd).
> >
> > Signed-off-by: Stratos Psomadakis <address@hidden>
> > Signed-off-by: Dimitris Aragiorgis <address@hidden>
Thanks, applied to the block branch.
(Also thanks to Markus for copying me, would have missed the patch
otherwise.)
> > tests/qemu-iotests/socket_scm_helper.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/tests/qemu-iotests/socket_scm_helper.c
> > b/tests/qemu-iotests/socket_scm_helper.c
> > index 0e2b285..8195983 100644
> > --- a/tests/qemu-iotests/socket_scm_helper.c
> > +++ b/tests/qemu-iotests/socket_scm_helper.c
> > @@ -52,7 +52,7 @@ static int send_fd(int fd, int fd_to_send)
> > cmsg->cmsg_len = CMSG_LEN(sizeof(int));
> > cmsg->cmsg_level = SOL_SOCKET;
> > cmsg->cmsg_type = SCM_RIGHTS;
> > - memcpy(CMSG_DATA(cmsg), &fd, sizeof(int));
> > + memcpy(CMSG_DATA(cmsg), &fd_to_send, sizeof(int));
> >
> > do {
> > ret = sendmsg(fd, &msg, 0);
>
> Ouch. Do you have an idea what's broken without this fix?
As far as I can tell, nothing. Test case 045 will send a different file
descriptor than it intended to, but the file descriptors aren't used
other than checking whether qemu correctly reports their existence, so
it doesn't matter.
I'm not adding qemu-stable therefore. Please correct me if I'm missing
something.
Kevin
- [Qemu-devel] [PATCH 0/2] Monitor-related fixes, Stratos Psomadakis, 2014/09/11
- [Qemu-devel] [PATCH 1/2] monitor: Reset HMP mon->rs on CHR_EVENT_CLOSED, Stratos Psomadakis, 2014/09/11
- Re: [Qemu-devel] [PATCH 1/2] monitor: Reset HMP mon->rs on CHR_EVENT_CLOSED, Markus Armbruster, 2014/09/12
- Re: [Qemu-devel] [synnefo-devel] Re: [PATCH 1/2] monitor: Reset HMP mon->rs on CHR_EVENT_CLOSED, Stratos Psomadakis, 2014/09/12
- [Qemu-devel] [PATCH resend 1/2] monitor: Reset HMP mon->rs on CHR_EVENT_CLOSED, Stratos Psomadakis, 2014/09/12
- Re: [Qemu-devel] [PATCH resend 1/2] monitor: Reset HMP mon->rs on CHR_EVENT_CLOSED, Luiz Capitulino, 2014/09/12
- Re: [Qemu-devel] [synnefo-devel] Re: [PATCH resend 1/2] monitor: Reset HMP mon->rs on CHR_EVENT_CLOSED, Stratos Psomadakis, 2014/09/12
- Re: [Qemu-devel] [synnefo-devel] Re: [PATCH resend 1/2] monitor: Reset HMP mon->rs on CHR_EVENT_CLOSED, Luiz Capitulino, 2014/09/12
- Re: [Qemu-devel] [synnefo-devel] Re: [PATCH resend 1/2] monitor: Reset HMP mon->rs on CHR_EVENT_CLOSED, Stratos Psomadakis, 2014/09/13
- Re: [Qemu-devel] [synnefo-devel] Re: [PATCH resend 1/2] monitor: Reset HMP mon->rs on CHR_EVENT_CLOSED, Luiz Capitulino, 2014/09/13