lkml.org 
[lkml]   [2019]   [Jan]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2 -next] tty: ipwireless: Fix potential NULL pointer dereference
From
Date
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

\
 
 \ /
  Last update: 2019-01-30 17:00    [W:0.046 / U:7.140 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site