Re: [PATCH 4/4] block: memory allocations in bounce_clone_bio must not fail

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

 



On Wed, Feb 24, 2021 at 07:19:52PM +0800, Ming Lei wrote:
> >  	if (bio_is_passthrough(bio_src))
> > -		bio = bio_kmalloc(GFP_NOIO, bio_segments(bio_src));
> > +		bio = bio_kmalloc(GFP_NOIO | __GFP_NOFAIL,
> > +				  bio_segments(bio_src));
> 
> bio_kmalloc() still may fail if bio_segments(bio_src) is > UIO_MAXIOV.

Yes, but bio_kmalloc is what is used to allocate the passthrough
requests to start with, so we'd not even make it here.



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux