mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
[BLOCK] Clear sg entry before filling in blk_rq_map_sg()
The memset() of the sg entry was originally removed, because it could overwrite a chain pointer. But it's quite OK to memset() it when we know it's a valid entry, since it can't contain a chain pointer. Signed-off-by: Jens Axboe <[email protected]>
This commit is contained in:
parent
bdb02504f4
commit
60573b874b
1 changed files with 1 additions and 0 deletions
|
|
@ -1352,6 +1352,7 @@ new_segment:
|
|||
sg = next_sg;
|
||||
next_sg = sg_next(sg);
|
||||
|
||||
memset(sg, 0, sizeof(*sg));
|
||||
sg->page = bvec->bv_page;
|
||||
sg->length = nbytes;
|
||||
sg->offset = bvec->bv_offset;
|
||||
|
|
|
|||
Loading…
Reference in a new issue