Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1435671

Re: [PATCH 1/3] ACPI: fix incorrect counts returned by acpi_parse_entries_array()

From Al Stone <ahs3@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH 1/3] ACPI: fix incorrect counts returned by acpi_parse_entries_array()
Date 2016-07-02 00:40 +0200
Message-ID <rQfgl-3S9-7@gated-at.bofh.it> (permalink)
References (2 earlier) <rQeaB-3g8-21@gated-at.bofh.it> <rQekh-3jb-3@gated-at.bofh.it> <rQetY-3mA-23@gated-at.bofh.it> <rQeDD-3pK-9@gated-at.bofh.it> <rQeNk-3If-11@gated-at.bofh.it>
Organization Red Hat, Inc.

Show all headers | View raw


On 07/01/2016 03:56 PM, Rafael J. Wysocki wrote:
> On Fri, Jul 1, 2016 at 11:50 PM, Al Stone <ahs3@redhat.com> wrote:
>> On 07/01/2016 03:44 PM, Rafael J. Wysocki wrote:
>>> On Fri, Jul 1, 2016 at 11:36 PM, Al Stone <ahs3@redhat.com> wrote:
>>>> On 07/01/2016 03:25 PM, Rafael J. Wysocki wrote:
>>>>> On Fri, Jul 1, 2016 at 11:21 PM, Al Stone <ahs3@redhat.com> wrote:
>>>>>> The static function acpi_parse_entries_array() is provided an array of
>>>>>> type struct acpi_subtable_proc that has a callback function and a count.
>>>>>> The count should reflect how many times the callback has been successfully
>>>>>> called.  However, the current code only increments the 0th element of the
>>>>>> array, regardless of the number of entries in the array, or which callback
>>>>>> has been invoked.  The fix is to use the index into the array, instead of
>>>>>> a pointer to the beginning of the array.
>>>>>
>>>>> OK, so it would be good to say what the consequences of the problem are too.
>>>>>
>>>>
>>>> Hrm.  So replace the last sentence with something like:
>>>>
>>>>    The fix is to use the index into the array, instead of
>>>>    a pointer to the beginning of the array, so that the count
>>>>    for each element in the array in incremented by the
>>>>    corresponding callback.
>>>>
>>>> That feels a little clunky but is it closer to what you were
>>>> thinking?
>>>
>>> Well, not really.
>>>
>>> The code is arguably incorrect, but is there anything that does not
>>> work as expected as a result?  Any functional breakage?  Any
>>> misleading messages printed?
>>>
>>
>> That's the odd thing; there is no breakage.  Of any sort.
>>
>> But, no one relies on those values for anything at this point.  I've got a
>> couple of ideas I'm working on that are easier if it does work right, however.
> 
> That's information that should go into the changelog too.
> 
> "There are no functional consequences of the issue, but fixing it is
> necessary for future work."
> 
> Or similar.
> 

Will do in v2.

-- 
ciao,
al
-----------------------------------
Al Stone
Software Engineer
Red Hat, Inc.
ahs3@redhat.com
-----------------------------------

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH 1/3] ACPI: fix incorrect counts returned by acpi_parse_entries_array() Al Stone <ahs3@redhat.com> - 2016-07-01 23:30 +0200
  Re: [PATCH 1/3] ACPI: fix incorrect counts returned by acpi_parse_entries_array() "Rafael J. Wysocki" <rafael@kernel.org> - 2016-07-01 23:30 +0200
    Re: [PATCH 1/3] ACPI: fix incorrect counts returned by  acpi_parse_entries_array() Al Stone <ahs3@redhat.com> - 2016-07-01 23:40 +0200
      Re: [PATCH 1/3] ACPI: fix incorrect counts returned by acpi_parse_entries_array() "Rafael J. Wysocki" <rafael@kernel.org> - 2016-07-01 23:50 +0200
        Re: [PATCH 1/3] ACPI: fix incorrect counts returned by  acpi_parse_entries_array() Al Stone <ahs3@redhat.com> - 2016-07-02 00:00 +0200
          Re: [PATCH 1/3] ACPI: fix incorrect counts returned by acpi_parse_entries_array() "Rafael J. Wysocki" <rafael@kernel.org> - 2016-07-02 00:10 +0200
            Re: [PATCH 1/3] ACPI: fix incorrect counts returned by  acpi_parse_entries_array() Al Stone <ahs3@redhat.com> - 2016-07-02 00:40 +0200

csiph-web