Re: [PATCH v2] block: avoid sign extend problem with default queue flags mask

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

 



On Mon, 3 Oct 2022 09:35:34 -0400, Brian Foster wrote:
> request_queue->queue_flags is unsigned long, which is 8-bytes on
> 64-bit architectures. Most queue flag modifications occur through
> bit field helpers, but default flags can be logically OR'd via the
> QUEUE_FLAG_MQ_DEFAULT mask. If this mask happens to include bit 31,
> the assignment can sign extend the field and set all upper 32 bits.
> 
> This exact problem has been observed on a downstream kernel that
> happens to use bit 31 for QUEUE_FLAG_NOWAIT. This is not an
> immediate problem for current upstream because bit 31 is not
> included in the default flag assignment (and is not used at all,
> actually). Regardless, fix up the QUEUE_FLAG_MQ_DEFAULT mask
> definition to avoid the landmine in the future.
> 
> [...]

Applied, thanks!

[1/1] block: avoid sign extend problem with default queue flags mask
      commit: ca5eebda3e1c1a58a1c5a337da393ed6734593e3

Best regards,
-- 
Jens Axboe





[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