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
| ||
|
Date: Mon, 4 Apr 2022 18:35:18 +0200 From: Robert Marko <robert.marko@...tura.hr> To: Michael Straube <straube.linux@...il.com> Cc: kvalo@...nel.org, David Miller <davem@...emloft.net>, kuba@...nel.org, ath11k@...ts.infradead.org, linux-wireless@...r.kernel.org, netdev@...r.kernel.org, Linux Kernel Mailing List <linux-kernel@...r.kernel.org> Subject: Re: [PATCH] ath11k: do not return random value On Mon, Apr 4, 2022 at 12:54 PM Michael Straube <straube.linux@...il.com> wrote: > > Function ath11k_qmi_assign_target_mem_chunk() returns a random value > if of_parse_phandle() fails because the return variable ret is not > initialized before calling of_parse_phandle(). Return -EINVAL to avoid > possibly returning 0, which would be wrong here. > > Issue found by smatch. > > Signed-off-by: Michael Straube <straube.linux@...il.com> > --- > drivers/net/wireless/ath/ath11k/qmi.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/net/wireless/ath/ath11k/qmi.c b/drivers/net/wireless/ath/ath11k/qmi.c > index 65d3c6ba35ae..81b2304b1fde 100644 > --- a/drivers/net/wireless/ath/ath11k/qmi.c > +++ b/drivers/net/wireless/ath/ath11k/qmi.c > @@ -1932,7 +1932,7 @@ static int ath11k_qmi_assign_target_mem_chunk(struct ath11k_base *ab) > if (!hremote_node) { > ath11k_dbg(ab, ATH11K_DBG_QMI, > "qmi fail to get hremote_node\n"); > - return ret; > + return -EINVAL; > } > > ret = of_address_to_resource(hremote_node, 0, &res); > -- > 2.35.1 Hi Michael, This is already solved in ath-next and 5.18-rc1: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/net/wireless/ath/ath11k/qmi.c?h=v5.18-rc1&id=c9b41832dc080fa59bad597de94865b3ea2d5bab Regards, Robert > > > -- > ath11k mailing list > ath11k@...ts.infradead.org > http://lists.infradead.org/mailman/listinfo/ath11k -- Robert Marko Staff Embedded Linux Engineer Sartura Ltd. Lendavska ulica 16a 10000 Zagreb, Croatia Email: robert.marko@...tura.hr Web: www.sartura.hr
Powered by blists - more mailing lists