Re: [PATCH] blk-mq: avoid sysfs buffer overflow by too many CPU cores

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

 



On Sun, Nov 3, 2019 at 8:28 AM Chaitanya Kulkarni
<Chaitanya.Kulkarni@xxxxxxx> wrote:
>
> Ming,
>
> On 11/02/2019 01:02 AM, Ming Lei wrote:
> > It is reported that sysfs buffer overflow can be triggered in case
> > of too many CPU cores(>841 on 4K PAGE_SIZE) when showing CPUs of
> > hctx via/sys/block/$DEV/mq/$N/cpu_list.
> >
> > So use snprintf for avoiding the potential buffer overflow.
> >
> > This version doesn't change the attribute format, and simply stop
> > to show CPU number if the buffer is to be overflow.
>
> Does it make sense to also add a print or WARN_ON in case of overflow ?

Yes, it does, could you cook a patch for that?

Thanks,
Ming Lei



[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