Possible bug in block/bounce.c

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

 



Hi all:

I hope this is the right place to ask about a potential bug in bounce.c. So on line 329 we assign the result of `mempool_alloc` to `to->bv_page` but we never check if `to->bv_page` is a valid pointer, also given that this variable is dereferenced in inc_zone_page_state. I wonder if we should add something like `if (to->bv_page == null)` here?

329: to->bv_page = mempool_alloc(pool, q->bounce_gfp);
330: inc_zone_page_state(to->bv_page, NR_BOUNCE);

Best,
Ziyang



[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