Re: [sheepdog] [PATCH] bs_sheepdog.c: add missing initialization of read data length

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



At Thu, 19 Dec 2013 14:46:58 +0900,
Ryusuke Konishi wrote:
> 
> In the sheepdog driver, the read data length argument of do_req
> function is not initialized by some caller functions such as
> sd_sync(), sd_close(), and create_branch().
> 
> This patch adds those missing initializations to prevent uncertain
> behavior in do_req() and fixes the following warning of valgrind:
> 
>  ==1885== Conditional jump or move depends on uninitialised value(s)
>  ==1885==    at 0x425994: do_req (bs_sheepdog.c:598)
>  ==1885==    by 0x426A06: bs_sheepdog_close (bs_sheepdog.c:1100)
>  ==1885==    by 0x4142B4: tgt_device_destroy (target.c:705)
>  ==1885==    by 0x412335: tgt_mgmt (mgmt.c:222)
>  ==1885==    by 0x412776: mtask_handler (mgmt.c:494)
>  ==1885==    by 0x4106A8: event_loop (tgtd.c:411)
>  ==1885==    by 0x410D64: main (tgtd.c:583)
> 
> Signed-off-by: Ryusuke Konishi <konishi.ryusuke@xxxxxxxxxxxxx>
> Cc: Hitoshi Mitake <mitake.hitoshi@xxxxxxxxxxxxx>
> ---
>  usr/bs_sheepdog.c |    6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)

Looks good to me.
Reviewed-by: Hitoshi Mitake <mitake.hitoshi@xxxxxxxxxxxxx>

Thanks,
Hitoshi
--
To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux SCSI]     [Linux RAID]     [Linux Clusters]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]

  Powered by Linux