diff mbox

[13/13] trivial patch for btrfs-progs

Message ID 1358715858-4469-14-git-send-email-gene@czarc.net (mailing list archive)
State New, archived
Headers show

Commit Message

Gene Czarcinski Jan. 20, 2013, 9:04 p.m. UTC
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>
---
 cmds-send.c | 1 +
 1 file changed, 1 insertion(+)

Comments

David Sterba Jan. 21, 2013, 5:40 p.m. UTC | #1
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
Gene Czarcinski Jan. 22, 2013, 6:59 p.m. UTC | #2
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 mbox

Patch

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];