lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <18206.1517.703650.1006@stoffel.org>
Date:	Tue, 23 Oct 2007 10:32:13 -0400
From:	"John Stoffel" <john@...ffel.org>
To:	Jens Axboe <jens.axboe@...cle.com>
Cc:	torvalds@...ux-foundation.org, linux-kernel@...r.kernel.org,
	mingo@...e.hu
Subject: Re: [PATCH 02/10] [SG] Update block layer to use sg helpers

>>>>> "Jens" == Jens Axboe <jens.axboe@...cle.com> writes:

Jens> Signed-off-by: Jens Axboe <jens.axboe@...cle.com>
Jens> ---
Jens>  block/ll_rw_blk.c |    8 ++++++--
Jens>  1 files changed, 6 insertions(+), 2 deletions(-)

Jens> diff --git a/block/ll_rw_blk.c b/block/ll_rw_blk.c
Jens> index 8025d64..61c2e39 100644
Jens> --- a/block/ll_rw_blk.c
Jens> +++ b/block/ll_rw_blk.c
Jens> @@ -1354,8 +1354,9 @@ new_segment:
Jens>  			else
Jens>  				sg = sg_next(sg);
 
Jens> -			memset(sg, 0, sizeof(*sg));
Jens> -			sg->page = bvec->bv_page;
Jens> +			sg_dma_len(sg) = 0;
Jens> +			sg_dma_address(sg) = 0;

Why don't you call these something like sg_set_dma_len() and
sg_set_dma_address() instead, to make it clear these set the values
and don't read them?

Jens> +			sg_set_page(sg, bvec->bv_page);

Esp since you have the sg_set_page() right below it.


sg-> length = nbytes;
sg-> offset = bvec->bv_offset;
Jens>  			nsegs++;
Jens> @@ -1363,6 +1364,9 @@ new_segment:
Jens>  		bvprv = bvec;
Jens>  	} /* segments in rq */
 
Jens> +	if (sg)
Jens> +		__sg_mark_end(sg);
Jens> +
Jens>  	return nsegs;
Jens>  }
 
Jens> -- 
Jens> 1.5.3.GIT

Jens> -
Jens> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
Jens> the body of a message to majordomo@...r.kernel.org
Jens> More majordomo info at  http://vger.kernel.org/majordomo-info.html
Jens> Please read the FAQ at  http://www.tux.org/lkml/


Jens> !DSPAM:471ce899205391598813817!
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ