From: Colin Ian King <colin.king@canonical.com>
Date: Tue, 31 Jul 2018 16:45:07 +0100
Subject: net: ieee802154: 6lowpan: remove redundant pointers 'fq' and 'net'
Patch-mainline: v4.19-rc1
Git-commit: 4e54acb2022099e41231271b5a8ec58ca8ac2d86
References: CVE-2018-5391 bsc#1103097
Pointers fq and net are being assigned but are never used hence they
are redundant and can be removed.
Cleans up clang warnings:
warning: variable 'fq' set but not used [-Wunused-but-set-variable]
warning: variable 'net' set but not used [-Wunused-but-set-variable]
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Stefan Schmidt <stefan@datenfreihafen.org>
Acked-by: Michal Kubecek <mkubecek@suse.cz>
---
net/ieee802154/6lowpan/reassembly.c | 5 -----
1 file changed, 5 deletions(-)
--- a/net/ieee802154/6lowpan/reassembly.c
+++ b/net/ieee802154/6lowpan/reassembly.c
@@ -40,9 +40,6 @@ static int lowpan_frag_reasm(struct lowpan_frag_queue *fq,
static void lowpan_frag_init(struct inet_frag_queue *q, const void *a)
{
const struct frag_lowpan_compare_key *key = a;
- struct lowpan_frag_queue *fq;
-
- fq = container_of(q, struct lowpan_frag_queue, q);
BUILD_BUG_ON(sizeof(*key) > sizeof(q->key));
memcpy(&q->key, key, sizeof(*key));
@@ -51,10 +48,8 @@ static void lowpan_frag_init(struct inet_frag_queue *q, const void *a)
static void lowpan_frag_expire(unsigned long data)
{
struct frag_queue *fq;
- struct net *net;
fq = container_of((struct inet_frag_queue *)data, struct frag_queue, q);
- net = container_of(fq->q.net, struct net, ieee802154_lowpan.frags);
spin_lock(&fq->q.lock);