Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190929163028.9665-9-romain.perier@gmail.com>
Date: Sun, 29 Sep 2019 18:30:20 +0200
From: Romain Perier <romain.perier@...il.com>
To: kernel-hardening@...ts.openwall.com
Cc: Kees Cook <keescook@...omium.org>,
	Romain Perier <romain.perier@...il.com>
Subject: [PRE-REVIEW PATCH 08/16] isdn: Prepare to use the new tasklet API

The future tasklet API will no longer allow to pass an arbitrary
"unsigned long" data parameter. The tasklet data structure will need to
be embedded into a data structure that will be retrieved from the tasklet
handler. The current tasklets handlers get the pointer of the "struct
bc_state", so it is an address we will need to retrieve from the
"struct bas_bc_state", parent of the tasklet being run. This commit adds
a new field in this structure, so we can get the address of the
corresponding "bcs" for any "ubc" and retrieve everything from the
tasklets handlers that will be modified soon.

Signed-off-by: Romain Perier <romain.perier@...il.com>
---
 drivers/staging/isdn/gigaset/bas-gigaset.c | 1 +
 drivers/staging/isdn/gigaset/gigaset.h     | 1 +
 2 files changed, 2 insertions(+)

diff --git a/drivers/staging/isdn/gigaset/bas-gigaset.c b/drivers/staging/isdn/gigaset/bas-gigaset.c
index c334525a5f63..a3febefde39b 100644
--- a/drivers/staging/isdn/gigaset/bas-gigaset.c
+++ b/drivers/staging/isdn/gigaset/bas-gigaset.c
@@ -2128,6 +2128,7 @@ static int gigaset_initbcshw(struct bc_state *bcs)
 		return -ENOMEM;
 	}
 
+	ubc->bcs = bcs;
 	ubc->running = 0;
 	atomic_set(&ubc->corrbytes, 0);
 	spin_lock_init(&ubc->isooutlock);
diff --git a/drivers/staging/isdn/gigaset/gigaset.h b/drivers/staging/isdn/gigaset/gigaset.h
index 0ecc2b5ea553..df745c7bf57c 100644
--- a/drivers/staging/isdn/gigaset/gigaset.h
+++ b/drivers/staging/isdn/gigaset/gigaset.h
@@ -559,6 +559,7 @@ struct bas_bc_state {
 	unsigned stolen0s;		/* '0' stuff bits also serving as
 					   leading flag bits */
 	struct tasklet_struct rcvd_tasklet;
+	struct bc_state *bcs;
 };
 
 struct gigaset_ops {
-- 
2.23.0

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.