From: Jiri Slaby <jslaby@suse.cz>
To: YueHaibing <yuehaibing@huawei.com>,
gregkh@linuxfoundation.org, David Sterba <DSterba@suse.com>
Cc: jikos@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 -next] tty: ipwireless: Fix potential NULL pointer dereference
Date: Wed, 30 Jan 2019 16:58:30 +0100 [thread overview]
Message-ID: <3813e1a8-7a54-9df0-4464-c463d7fa0b63@suse.cz> (raw)
In-Reply-To: <20190130103051.5256-1-yuehaibing@huawei.com>
On 30. 01. 19, 11:30, YueHaibing wrote:
> There is a potential NULL pointer dereference in case
> alloc_ctrl_packet() fails and returns NULL.
>
> Fixes: 099dc4fb6265 ("ipwireless: driver for PC Card 3G/UMTS modem")
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
> v2: fix return value
> ---
> drivers/tty/ipwireless/hardware.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/tty/ipwireless/hardware.c b/drivers/tty/ipwireless/hardware.c
> index b0baa4c..1e21ae3 100644
> --- a/drivers/tty/ipwireless/hardware.c
> +++ b/drivers/tty/ipwireless/hardware.c
> @@ -1516,6 +1516,8 @@ static void ipw_send_setup_packet(struct ipw_hardware *hw)
> sizeof(struct ipw_setup_get_version_query_packet),
> ADDR_SETUP_PROT, TL_PROTOCOLID_SETUP,
> TL_SETUP_SIGNO_GET_VERSION_QRY);
> + if (!ver_packet)
> + return;
LGTM, the timer will retry 30 times, ticking every second.
Acked-by: Jiri Slaby <jslaby@suse.cz>
--
js
suse labs
next prev parent reply other threads:[~2019-01-30 15:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-30 10:30 YueHaibing
2019-01-30 15:58 ` Jiri Slaby [this message]
2019-01-31 12:32 ` David Sterba
2019-01-31 12:34 ` Jiri Slaby
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=3813e1a8-7a54-9df0-4464-c463d7fa0b63@suse.cz \
--to=jslaby@suse.cz \
--cc=DSterba@suse.com \
--cc=gregkh@linuxfoundation.org \
--cc=jikos@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=yuehaibing@huawei.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
all inboxes | Powered by JetHome®