[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5ec3e671-53aa-b8cc-1360-c454f3db277d@redhat.com>
Date: Mon, 28 Mar 2022 06:27:01 -0700
From: Tom Rix <trix@...hat.com>
To: Russ Weight <russell.h.weight@...el.com>, mcgrof@...nel.org,
gregkh@...uxfoundation.org, rafael@...nel.org,
linux-kernel@...r.kernel.org
Cc: lgoncalv@...hat.com, yilun.xu@...el.com, hao.wu@...el.com,
matthew.gerlach@...el.com, basheer.ahmed.muddebihal@...el.com,
tianfei.zhang@...el.com
Subject: Re: [RESEND PATCH v1 1/8] firmware_loader: Clear data and size in
fw_free_paged_buf
On 3/23/22 4:33 PM, Russ Weight wrote:
> The fw_free_paged_buf() function resets the paged buffer information in
> the fw_priv data structure. Additionally, clear the data and size members
> of fw_priv in order to facilitate the reuse of fw_priv. This is being
> done in preparation for enabling userspace to initiate multiple firmware
> uploads using this sysfs interface.
>
> Signed-off-by: Russ Weight <russell.h.weight@...el.com>
> ---
> v1:
> - No change from RFC patch
> ---
> drivers/base/firmware_loader/main.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/base/firmware_loader/main.c b/drivers/base/firmware_loader/main.c
> index 94d1789a233e..2cc11d93753a 100644
> --- a/drivers/base/firmware_loader/main.c
> +++ b/drivers/base/firmware_loader/main.c
> @@ -253,6 +253,8 @@ void fw_free_paged_buf(struct fw_priv *fw_priv)
Why isn't a vfree needed or realloc done?
Tom
> fw_priv->pages = NULL;
> fw_priv->page_array_size = 0;
> fw_priv->nr_pages = 0;
> + fw_priv->data = NULL;
> + fw_priv->size = 0;
> }
>
> int fw_grow_paged_buf(struct fw_priv *fw_priv, int pages_needed)
Powered by blists - more mailing lists