All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jarod Wilson <jarod@redhat.com>
To: Dan Carpenter <error27@gmail.com>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>,
	linux-media@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [patch -next] V4L/DVB: IR/streamzap: fix usec to nsec conversion
Date: Tue, 12 Oct 2010 13:12:57 +0000	[thread overview]
Message-ID: <20101012131257.GB4057@redhat.com> (raw)
In-Reply-To: <20101012060110.GA13176@bicker>

On Tue, Oct 12, 2010 at 08:01:11AM +0200, Dan Carpenter wrote:
> There is an integer overflow here because 0x03000000 * 1000 is too large
> for 31 bits.
> 
> rawir.duration should be in terms of nsecs.
> IR_MAX_DURATION and 0x03000000 are already in terms of nsecs.
> STREAMZAP_TIMEOUT and STREAMZAP_RESOLUTION are 255 and 256 respectively
> and are in terms of usecs.
> 
> The original code had a deadline of 1.005 seconds and the new code has a
> deadline of .065 seconds. 
> 
> Signed-off-by: Dan Carpenter <error27@gmail.com>

Nice catch, fix looks good.

Acked-by: Jarod Wilson <jarod@redhat.com>

-- 
Jarod Wilson
jarod@redhat.com


WARNING: multiple messages have this Message-ID (diff)
From: Jarod Wilson <jarod@redhat.com>
To: Dan Carpenter <error27@gmail.com>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>,
	linux-media@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [patch -next] V4L/DVB: IR/streamzap: fix usec to nsec conversion
Date: Tue, 12 Oct 2010 09:12:57 -0400	[thread overview]
Message-ID: <20101012131257.GB4057@redhat.com> (raw)
In-Reply-To: <20101012060110.GA13176@bicker>

On Tue, Oct 12, 2010 at 08:01:11AM +0200, Dan Carpenter wrote:
> There is an integer overflow here because 0x03000000 * 1000 is too large
> for 31 bits.
> 
> rawir.duration should be in terms of nsecs.
> IR_MAX_DURATION and 0x03000000 are already in terms of nsecs.
> STREAMZAP_TIMEOUT and STREAMZAP_RESOLUTION are 255 and 256 respectively
> and are in terms of usecs.
> 
> The original code had a deadline of 1.005 seconds and the new code has a
> deadline of .065 seconds. 
> 
> Signed-off-by: Dan Carpenter <error27@gmail.com>

Nice catch, fix looks good.

Acked-by: Jarod Wilson <jarod@redhat.com>

-- 
Jarod Wilson
jarod@redhat.com


  reply	other threads:[~2010-10-12 13:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-12  6:01 [patch -next] V4L/DVB: IR/streamzap: fix usec to nsec conversion Dan Carpenter
2010-10-12  6:01 ` Dan Carpenter
2010-10-12 13:12 ` Jarod Wilson [this message]
2010-10-12 13:12   ` Jarod Wilson

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=20101012131257.GB4057@redhat.com \
    --to=jarod@redhat.com \
    --cc=error27@gmail.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@infradead.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.