All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Garzik <jgarzik@pobox.com>
To: Tejun Heo <tj@kernel.org>
Cc: Sandor Bodo-Merle <sbodomerle@gmail.com>,
	"Huang, Shane" <Shane.Huang@amd.com>,
	ide <linux-ide@vger.kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH 1/4] dmi: fix date handling in dmi_get_year()
Date: Tue, 08 Sep 2009 21:19:46 -0400	[thread overview]
Message-ID: <4AA702B2.8040904@pobox.com> (raw)
In-Reply-To: <4A87F512.3080802@kernel.org>

On 08/16/2009 08:01 AM, Tejun Heo wrote:
> Year parsing in dmi_get_year() had the following two bugs.
>
> * "00" is treated as invalid instead of 2000 because zero return from
>    simple_strtoul() is treated as error.
>
> * "0N" where N>= 8 is treated as invalid of 200N because the leading
>    0 is considered to specify octal.
>
> Fix the above two bugs by using endptr to detect invalid number and
> forcing decimal.
>
> Signed-off-by: Tejun Heo<tj@kernel.org>
> ---
> While trying to implement dmi_get_date(), spotted two bugs in the
> current dmi_get_year().  Tricky date strings.  ;-P
>
> I think it would be safer to postpone this and the next patch for the
> next merge window.  There's no reported case of these bugs causing
> problems yet, so no reason to risk behavior change at this stage.  If
> nobody objects, it would be easiest to push this through
> libata-dev#upstream.
>
> Thanks.
>
>   drivers/firmware/dmi_scan.c |    5 +++--
>   1 file changed, 3 insertions(+), 2 deletions(-)

applied 1-4



      parent reply	other threads:[~2009-09-09  1:20 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-16 12:01 [PATCH 1/4] dmi: fix date handling in dmi_get_year() Tejun Heo
2009-08-16 12:02 ` [PATCH 2/4] dmi: extend dmi_get_year() to dmi_get_date() Tejun Heo
2009-08-16 12:03   ` [PATCH 3/4 #upstream] ahci: make ahci_asus_m2a_vm_32bit_only() quirk more generic Tejun Heo
2009-08-16 12:06     ` [PATCH 4/4 #upstream] ahci: Gigabyte GA-MA69VM-S2 can't do 64bit DMA Tejun Heo
2009-08-16 12:04   ` [PATCH 3/4 #upstream] ahci: make ahci_asus_m2a_vm_32bit_only() quirk more generic Tejun Heo
2009-08-16 12:11 ` [PATCH 1/4] dmi: fix date handling in dmi_get_year() Jeff Garzik
2009-09-09  1:19 ` Jeff Garzik [this message]

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=4AA702B2.8040904@pobox.com \
    --to=jgarzik@pobox.com \
    --cc=Shane.Huang@amd.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=sbodomerle@gmail.com \
    --cc=tj@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 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.