From 5011f9b440c8c4144473d9a26171fc8ecf59d059 Mon Sep 17 00:00:00 2001 From: ravindu644 Date: Sun, 22 Feb 2026 22:24:27 +0530 Subject: [PATCH] [PATCH 1/2] Droidspaces/LXC: fix: avoid kernel panic in xt_qtaguid by removing unsafe dev_get_stats usage on inactive interfaces Signed-off-by: ravindu644 --- net/netfilter/xt_qtaguid.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/net/netfilter/xt_qtaguid.c b/net/netfilter/xt_qtaguid.c index 8cb9c30bf..bf4bd9f56 100755 --- a/net/netfilter/xt_qtaguid.c +++ b/net/netfilter/xt_qtaguid.c @@ -739,7 +739,7 @@ static int iface_stat_fmt_proc_show(struct seq_file *m, void *v) { struct proc_iface_stat_fmt_info *p = m->private; struct iface_stat *iface_entry; - struct rtnl_link_stats64 dev_stats, *stats; + struct rtnl_link_stats64 *stats; struct rtnl_link_stats64 no_dev_stats = {0}; @@ -748,12 +748,8 @@ static int iface_stat_fmt_proc_show(struct seq_file *m, void *v) iface_entry = list_entry(v, struct iface_stat, list); - if (iface_entry->active) { - stats = dev_get_stats(iface_entry->net_dev, - &dev_stats); - } else { - stats = &no_dev_stats; - } + stats = &no_dev_stats; + /* * If the meaning of the data changes, then update the fmtX * string.