[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <6797e409-2cad-fb22-c430-28c7915a2812@huawei.com>
Date: Wed, 30 Jan 2019 18:28:47 +0800
From: YueHaibing <yuehaibing@...wei.com>
To: <dsterba@...e.com>, <gregkh@...uxfoundation.org>, <jslaby@...e.com>
CC: <linux-kernel@...r.kernel.org>, <jikos@...nel.org>
Subject: Re: [PATCH -next] tty: ipwireless: Fix potential NULL pointer
dereference
Pls ignore this, sorry.
On 2019/1/30 18:26, 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@...wei.com>
> ---
> 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 -ENOMEM;
> ver_packet->header.length = sizeof(struct tl_setup_get_version_qry);
>
> /*
>
Powered by blists - more mailing lists