[bug report] block, bfq: update blkio stats outside the scheduler lock

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

 



Hello Paolo Valente,

This is a semi-automatic email about new static checker warnings.

The patch 24bfd19bb789: "block, bfq: update blkio stats outside the 
scheduler lock" from Nov 13, 2017, leads to the following Smatch 
complaint:

    block/bfq-iosched.c:5013 __bfq_insert_request()
    error: we previously assumed 'bfqq' could be null (see line 5008)

block/bfq-iosched.c
  5007	
  5008		waiting = bfqq && bfq_bfqq_wait_request(bfqq);
                          ^^^^
The patch adds a NULL check here.  Hopefully it's not required because

  5009		bfq_add_request(rq);
  5010		idle_timer_disabled = waiting && !bfq_bfqq_wait_request(bfqq);
  5011	
  5012		rq->fifo_time = ktime_get_ns() + bfqd->bfq_fifo_expire[rq_is_sync(rq)];
  5013		list_add_tail(&rq->queuelist, &bfqq->fifo);
                                              ^^^^^^^^^^^
the existing code assumes "bfqq" is valid.

  5014	
  5015		bfq_rq_enqueued(bfqd, bfqq, rq);

regards,
dan carpenter



[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