drivers/tty/ipwireless/network.c | 1 + 1 file changed, 1 insertion(+)
The ppp_channel is allocated and registered in do_go_online(). But when
the channel is unregistered in do_go_offline(), the driver forgets to
release its memory. This leads to a memory leak each time the network
goes online and then offline.
Fix this by adding a kfree call after unregistering the channel.
Fixes: 099dc4fb6265 ("ipwireless: driver for PC Card 3G/UMTS modem")
Signed-off-by: Qingfang Deng <dqfext@gmail.com>
---
drivers/tty/ipwireless/network.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/tty/ipwireless/network.c b/drivers/tty/ipwireless/network.c
index ad2c5157a018..ec0353c1005a 100644
--- a/drivers/tty/ipwireless/network.c
+++ b/drivers/tty/ipwireless/network.c
@@ -303,6 +303,7 @@ static void do_go_offline(struct work_struct *work_go_offline)
spin_unlock_irqrestore(&network->lock, flags);
mutex_unlock(&network->close_lock);
ppp_unregister_channel(channel);
+ kfree(channel);
} else {
spin_unlock_irqrestore(&network->lock, flags);
mutex_unlock(&network->close_lock);
--
2.43.0
On Fri, Mar 06, 2026 at 11:40:58AM +0800, Qingfang Deng wrote:
> The ppp_channel is allocated and registered in do_go_online(). But when
> the channel is unregistered in do_go_offline(), the driver forgets to
> release its memory. This leads to a memory leak each time the network
> goes online and then offline.
>
> Fix this by adding a kfree call after unregistering the channel.
>
> Fixes: 099dc4fb6265 ("ipwireless: driver for PC Card 3G/UMTS modem")
> Signed-off-by: Qingfang Deng <dqfext@gmail.com>
Thanks, but the driver is going to be deleted.
On Thu, Mar 12, 2026 at 01:00:36PM +0100, David Sterba wrote:
> On Fri, Mar 06, 2026 at 11:40:58AM +0800, Qingfang Deng wrote:
> > The ppp_channel is allocated and registered in do_go_online(). But when
> > the channel is unregistered in do_go_offline(), the driver forgets to
> > release its memory. This leads to a memory leak each time the network
> > goes online and then offline.
> >
> > Fix this by adding a kfree call after unregistering the channel.
> >
> > Fixes: 099dc4fb6265 ("ipwireless: driver for PC Card 3G/UMTS modem")
> > Signed-off-by: Qingfang Deng <dqfext@gmail.com>
>
> Thanks, but the driver is going to be deleted.
>
Great, can you send a patch to do that?
thanks,
greg k-h
© 2016 - 2026 Red Hat, Inc.