All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: paolo.valente@linaro.org
Cc: linux-block@vger.kernel.org
Subject: [bug report] block, bfq: bring forward seek&think time update
Date: Thu, 27 Jun 2019 11:03:00 +0300	[thread overview]
Message-ID: <20190627080300.GA28276@mwanda> (raw)

Hello Paolo Valente,

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

The patch a3f9bce3697a: "block, bfq: bring forward seek&think time 
update" from Jun 25, 2019, leads to the following Smatch complaint:

    block/bfq-iosched.c:5353 __bfq_insert_request()
    warn: variable dereferenced before check 'bfqq' (see line 5349)

block/bfq-iosched.c
  5348	
  5349		bfq_update_io_thinktime(bfqd, bfqq);
                                              ^^^^
The patch introduces a new dereference (inside the function)

  5350		bfq_update_has_short_ttime(bfqd, bfqq, RQ_BIC(rq));
  5351		bfq_update_io_seektime(bfqd, bfqq, rq);
  5352	
  5353		waiting = bfqq && bfq_bfqq_wait_request(bfqq);
                          ^^^^
but the old code assumed "bfqq" could be NULL.

  5354		bfq_add_request(rq);
  5355		idle_timer_disabled = waiting && !bfq_bfqq_wait_request(bfqq);

regards,
dan carpenter

                 reply	other threads:[~2019-06-27  8:03 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190627080300.GA28276@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=linux-block@vger.kernel.org \
    --cc=paolo.valente@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.