Message ID | 1358715858-4469-14-git-send-email-gene@czarc.net (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Sun, Jan 20, 2013 at 04:04:18PM -0500, Gene Czarcinski wrote: > From: Arvin Schnell <aschnell@suse.de> > > Hi, > > please find attached a trivial patch for btrfs-progs. Likely not > strictly needed but I noticed valgrind complaining about > uninitialised memory in the ioctl call. > > Regards, > Arvin > > Signed-off-by: Gene Czarcinski <gene@czarc.net> I've updated the changelog to say --- btrfs-progs: initialize data before send ioctl Likely not strictly needed but I noticed valgrind complaining about uninitialised memory in the ioctl call. Signed-off-by: Arvin Schnell <aschnell@suse.de> --- is it ok for both of you? david -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 01/21/2013 12:40 PM, David Sterba wrote: > On Sun, Jan 20, 2013 at 04:04:18PM -0500, Gene Czarcinski wrote: >> From: Arvin Schnell <aschnell@suse.de> >> >> Hi, >> >> please find attached a trivial patch for btrfs-progs. Likely not >> strictly needed but I noticed valgrind complaining about >> uninitialised memory in the ioctl call. >> >> Regards, >> Arvin >> >> Signed-off-by: Gene Czarcinski <gene@czarc.net> > I've updated the changelog to say > --- > btrfs-progs: initialize data before send ioctl > > Likely not strictly needed but I noticed valgrind complaining about > uninitialised memory in the ioctl call. > > Signed-off-by: Arvin Schnell <aschnell@suse.de> > --- > > is it ok for both of you? > > david > Of course. It is usually a good thing to not make assumptions where you do not have to. Gene -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/cmds-send.c b/cmds-send.c index b33c802..595a5d0 100644 --- a/cmds-send.c +++ b/cmds-send.c @@ -273,6 +273,7 @@ static int do_send(struct btrfs_send *send, u64 root_id, u64 parent_root) goto out; } + memset(&io_send, 0, sizeof(io_send)); io_send.send_fd = pipefd[1]; send->send_fd = pipefd[0];