From: Kalle Valo <kvalo@qca.qualcomm.com>
To: <maninder1.s@samsung.com>
Cc: "ath10k@lists.infradead.org" <ath10k@lists.infradead.org>,
"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
PANKAJ MISHRA <pankaj.m@samsung.com>
Subject: Re: [PATCH 1/1] ath10k: fixing wrong initialization of struct channel
Date: Tue, 21 Jul 2015 18:56:05 +0300 [thread overview]
Message-ID: <87bnf5mrmy.fsf@kamboji.qca.qualcomm.com> (raw)
In-Reply-To: <1785807958.195941437479984203.JavaMail.weblogic@epmlwas04a> (Maninder Singh's message of "Tue, 21 Jul 2015 11:59:44 +0000")
Maninder Singh <maninder1.s@samsung.com> writes:
>>> chandef is initialized with NULL and on the very next line,
>>> we are using it to get channel, which is not correct.
>>>
>>> channel should be initialized after obtaining chandef.
>>>
>>> Signed-off-by: Maninder Singh <maninder1.s@samsung.com>
>
>>How did you find this bug?
>
> Static anlysis reports this bug like coverity or any other static tool like cppcheck :-
>
> drivers/net/wireless/ath/ath10k/mac.c:839]: (error) Possible null pointer dereference: chandef
Thanks. This is always good to add to the commit log so I did that:
ath10k: fix wrong initialization of struct channel
chandef is initialized with NULL and on the very next line, we are using it to
get channel, which is not correct. Channel should be initialized after
obtaining chandef.
Found by cppcheck:
ath/ath10k/mac.c:839]: (error) Possible null pointer dereference: chandef
Signed-off-by: Maninder Singh <maninder1.s@samsung.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
--
Kalle Valo
next prev parent reply other threads:[~2015-07-21 15:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-21 11:59 [PATCH 1/1] ath10k: fixing wrong initialization of struct channel Maninder Singh
2015-07-21 15:56 ` Kalle Valo [this message]
-- strict thread matches above, loose matches on Subject: below --
2015-07-16 3:55 Maninder Singh
2015-07-21 11:54 ` Kalle Valo
2015-07-24 7:48 ` Kalle Valo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87bnf5mrmy.fsf@kamboji.qca.qualcomm.com \
--to=kvalo@qca.qualcomm.com \
--cc=ath10k@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=maninder1.s@samsung.com \
--cc=netdev@vger.kernel.org \
--cc=pankaj.m@samsung.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).