[dm-crypt] Re: [dm-devel] [stable][PATCH < 2.6.19] Fix data corruption with dm-crypt over RAID5
Christophe Saout
christophe at saout.de
Mon Jan 22 13:38:59 UTC 2007
Am Mittwoch, den 17.01.2007, 00:44 -0800 schrieb Piet Delaney:
> I'm wondering about trying out your patch with dm-crypt on 2.6.12.
> The code in drivers/md/dm-crypt.c`crypt_endio() appears to be the same.
Yes, it should apply as well.
> Is there a reason that this isn't necessary or would be a bad idea.
> Looks like the existing code isn't checking the BIO_UPTODATE flag
> before doing the bio_put(). Looks the the second part of not calling
> kcryptd_queue_io() and forwarding the processing to the cryptd is
> effectively the same. The 1st change will set error if BIO_UPTODATE
> isn't set and that will cause the 2nd change to skip calling
> kcryptd_queue_io().
Correct.
> I'm not sure about the change in the arg to bio_data_dir()
> changing from bio to io->bio. Perhaps they are equivalent;
> care to comment on that.
It's just to fix the use-after-free case, apart from that all bio's
involved have the same data direction, of course.
PS: Sorry because of the Wiki defacement, when I find some time I will
look into it. Just reverting won't help this time as the bots are
currently changing the pages at least once per hour.
More information about the dm-devel
mailing list