Re: [PATCH] block/bio-integrity: don't free 'buf' if bio_integrity_add_page() failed
From: Martin K. Petersen
Date: Tue Jun 02 2020 - 18:35:28 EST
I suggest a few minor wording tweaks to the commit message:
> commit e7bf90e5afe3 ("block/bio-integrity: fix a memory leak bug") add
> a kree() for 'buf' if bio_integrity_add_page() return '0'. However,
> object will be freed in bio_integrity_free() since 'bio->bi_opf' and
> 'bio->bi_integrity' was set previousy in bio_integrity_alloc().
And like Ming pointed out, you may want to add a comment about the
assertion that the first vec is valid.
Acked-by: Martin K. Petersen <martin.petersen@xxxxxxxxxx>
Martin K. Petersen Oracle Linux Engineering