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: <CAAs364_6MpywkbsFdZrT5TEdrD8+u1eTmg-8_KY0dypy_PgMxQ@mail.gmail.com>
Date:   Fri, 15 Mar 2019 10:49:46 +0530
From:   Vaibhav Agarwal <vaibhav.sr@...il.com>
To:     Kangjie Lu <kjlu@....edu>
Cc:     pakki001@....edu, Mark Greer <mgreer@...malcreek.com>,
        Johan Hovold <johan@...nel.org>, Alex Elder <elder@...nel.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        greybus-dev@...ts.linaro.org, devel@...verdev.osuosl.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] greybus: audio_manager: fix a missing check of ida_simple_get

On Thu, Mar 14, 2019 at 12:15 PM Kangjie Lu <kjlu@....edu> wrote:
>
> ida_simple_get could fail. The fix inserts a check for its
> return value.
>
> Signed-off-by: Kangjie Lu <kjlu@....edu>
> ---
>  drivers/staging/greybus/audio_manager.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/drivers/staging/greybus/audio_manager.c b/drivers/staging/greybus/audio_manager.c
> index d44b070d8862..c2a4af4c1d06 100644
> --- a/drivers/staging/greybus/audio_manager.c
> +++ b/drivers/staging/greybus/audio_manager.c
> @@ -45,6 +45,9 @@ int gb_audio_manager_add(struct gb_audio_manager_module_descriptor *desc)
>         int err;
>
>         id = ida_simple_get(&module_id, 0, 0, GFP_KERNEL);
> +       if (id < 0)
> +               return id;
> +
>         err = gb_audio_manager_module_create(&module, manager_kset,
>                                              id, desc);
>         if (err) {

Reviewed-by: Vaibhav Agarwal <vaibhav.sr@...il.com>

--
./va

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ