public inbox for linux-block@vger.kernel.org
 help / color / mirror / Atom feed
* [bug report] block, bfq: update blkio stats outside the scheduler lock
@ 2019-04-03  6:15 Dan Carpenter
  0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2019-04-03  6:15 UTC (permalink / raw)
  To: paolo.valente; +Cc: linux-block

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-04-03  6:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-03  6:15 [bug report] block, bfq: update blkio stats outside the scheduler lock Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox