public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: walter harms <wharms@bfs.de>
To: Andrey Utkin <andrey.krieger.utkin@gmail.com>
Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org,
	kgdb-bugreport@lists.sourceforge.net, dcb314@hotmail.com,
	jason.wessel@windriver.com
Subject: Re: [PATCH 4/5] kernel/debug/kdb/kdb_bp.c: drop negativity check on unsigned value
Date: Fri, 18 Jul 2014 19:18:13 +0200	[thread overview]
Message-ID: <53C956D5.50809@bfs.de> (raw)
In-Reply-To: <1405697692-23816-1-git-send-email-andrey.krieger.utkin@gmail.com>



Am 18.07.2014 17:34, schrieb Andrey Utkin:
> Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=80591
> Reported-by: David Binderman <dcb314@hotmail.com>
> Signed-off-by: Andrey Utkin <andrey.krieger.utkin@gmail.com>
> ---
>  kernel/debug/kdb/kdb_bp.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/kernel/debug/kdb/kdb_bp.c b/kernel/debug/kdb/kdb_bp.c
> index 70a5046..f27dfb8 100644
> --- a/kernel/debug/kdb/kdb_bp.c
> +++ b/kernel/debug/kdb/kdb_bp.c
> @@ -39,7 +39,7 @@ static char *kdb_rwtypes[] = {
>  
>  static char *kdb_bptype(kdb_bp_t *bp)
>  {
> -	if (bp->bp_type < 0 || bp->bp_type > 4)
> +	if (bp->bp_type > 4)
>  		return "";
>  
>  	return kdb_rwtypes[bp->bp_type];

i would expect a ckeck for the upper limit with ARRAY_SIZE(bp->bp_type) here.

re,
 wh

  reply	other threads:[~2014-07-18 17:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-18 15:34 [PATCH 4/5] kernel/debug/kdb/kdb_bp.c: drop negativity check on unsigned value Andrey Utkin
2014-07-18 17:18 ` walter harms [this message]
2014-07-18 17:41   ` Andrey Utkin
2014-07-22  7:47 ` Dan Carpenter

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=53C956D5.50809@bfs.de \
    --to=wharms@bfs.de \
    --cc=andrey.krieger.utkin@gmail.com \
    --cc=dcb314@hotmail.com \
    --cc=jason.wessel@windriver.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=kgdb-bugreport@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox