[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aYMfHiBrODTx1vRL@smile.fi.intel.com>
Date: Wed, 4 Feb 2026 12:27:42 +0200
From: Andy Shevchenko <andriy.shevchenko@...el.com>
To: Minu Jin <s9430939@...er.com>
Cc: gregkh@...uxfoundation.org, andy@...nel.org, dan.carpenter@...aro.org,
trohan2000@...il.com, straube.linux@...il.com,
linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v5 3/5] staging: rtl8723bs: replace rtw_zmalloc() with
kzalloc()
On Wed, Feb 04, 2026 at 03:44:52PM +0900, Minu Jin wrote:
> Replace the wrapper function rtw_zmalloc() with standard kzalloc().
> Use kzalloc() for rtw_malloc() calls that were followed by manual
> zero initialization.
>
> Additionally, use array_size() and size_add() to prevent potential
> integer overflows during allocation size calculation.
Reviewed-by: Andy Shevchenko <andriy.shevchenko@...el.com>
...
> static int cfg80211_rtw_add_key(struct wiphy *wiphy, struct net_device *ndev,
> struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
>
> param_len = sizeof(struct ieee_param) + params->key_len;
> - param = rtw_malloc(param_len);
> + param = kzalloc(param_len, GFP_KERNEL);
> if (!param)
> return -1;
Also -ENOMEM?
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists