Re: [PATCH] block: bio: ensure newly added bio flags don't override BVEC_POOL_IDX

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

 



On 4/3/19 11:15 AM, Johannes Thumshirn wrote:
With the introduction of BIO_NO_PAGE_REF we've used up all available bits
in bio::bi_flags.

Convert the defines of the flags to an enum and add a BUILD_BUG_ON() call
to make sure no-one adds a new one and thus overrides the BVEC_POOL_IDX
causing crashes.

Signed-off-by: Johannes Thumshirn <jthumshirn@xxxxxxx>

---
This used to be part of my bio patchset but as it's a) not clear why we
end up calling bio_put() on the on-stack bio and b) the needed prep patch
for the fix introduces a regression, I've decided to sent this patch out
as it's valid on it's own.

I dropped Hannes' and Christoph's R-b though, as the context changed.
---
  block/bio.c               |  3 +++
  include/linux/blk_types.h | 29 ++++++++++++++++-------------
  2 files changed, 19 insertions(+), 13 deletions(-)

Reviewed-by: Hannes Reinecke <hare@xxxxxxxx>

Cheers,

Hannes
--
Dr. Hannes Reinecke            Teamlead Storage & Networking
hare@xxxxxxx                              +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Mary Higgins, Sri Rasiah
HRB 21284 (AG Nürnberg)



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux