lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKfTPtBFcwSGm8oxd7e-xqUvyHjRfOawFrJiKeF_E4Lj=qPZ7w@mail.gmail.com>
Date:   Mon, 2 Jul 2018 09:23:33 +0200
From:   Vincent Guittot <vincent.guittot@...aro.org>
To:     Georgi Djakov <georgi.djakov@...aro.org>
Cc:     "open list:THERMAL" <linux-pm@...r.kernel.org>,
        "gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
        "Rafael J. Wysocki" <rjw@...ysocki.net>,
        Rob Herring <robh+dt@...nel.org>,
        mturquette <mturquette@...libre.com>,
        Kevin Hilman <khilman@...libre.com>,
        Saravana Kannan <skannan@...eaurora.org>,
        Bjorn Andersson <bjorn.andersson@...aro.org>,
        Amit Kucheria <amit.kucheria@...aro.org>,
        "Sweeney, Sean" <seansw@....qualcomm.com>,
        daidavid1@...eaurora.org, Evan Green <evgreen@...omium.org>,
        Mark Rutland <mark.rutland@....com>,
        Lorenzo Pieralisi <lorenzo.pieralisi@....com>,
        Alexandre Bailon <abailon@...libre.com>,
        linux-kernel <linux-kernel@...r.kernel.org>,
        LAK <linux-arm-kernel@...ts.infradead.org>,
        linux-arm-msm@...r.kernel.org
Subject: Re: [PATCH v5 1/8] interconnect: Add generic on-chip interconnect API

On Sun, 1 Jul 2018 at 13:09, Georgi Djakov <georgi.djakov@...aro.org> wrote:
>
> Hi Vincent,
>
> On 27.06.18 г. 9:19, Vincent Guittot wrote:
> > Hi Georgi
> >
> > On Wed, 20 Jun 2018 at 14:11, Georgi Djakov <georgi.djakov@...aro.org> wrote:
> >
> > [snip]
> >
> >> +
> >> +static struct icc_path *path_allocate(struct icc_node *dst, ssize_t num_nodes)
> >> +{
> >> +       struct icc_node *node = dst;
> >> +       struct icc_path *path;
> >> +       size_t i;
> >> +
> >> +       path = kzalloc(sizeof(*path) + num_nodes * sizeof(*path->reqs),
> >
> > Should be (num_nodes -1) * sizeof(*path->reqs) as there is already 1
> > icc_req in icc_path struct
>
> reqs[] is a flexible array member and it's size is not included in
> sizeof(*path)

ah yes, my eyes saw "struct icc_req reqs[0];"  but my brain was
reading "struct icc_req reqs[1]"

Sorry for the noise

>
> Thanks,
> Georgi
>
> >> +                      GFP_KERNEL);
> >> +       if (!path)
> >> +               return ERR_PTR(-ENOMEM);
> >> +
> >> +       path->num_nodes = num_nodes;
> >> +
> >> +       for (i = 0; i < num_nodes; i++) {
> >> +               hlist_add_head(&path->reqs[i].req_node, &node->req_list);
> >> +
> >> +               path->reqs[i].node = node;
> >> +               /* reference to previous node was saved during path traversal */
> >> +               node = node->reverse;
> >> +       }
> >> +
> >> +       return path;
> >> +}
> >> +
> >
> > [snip]
> >
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ