[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20170302163834.2273519-22-arnd@arndb.de>
Date: Thu, 2 Mar 2017 17:38:29 +0100
From: Arnd Bergmann <arnd@...db.de>
To: kasan-dev@...glegroups.com
Cc: Andrey Ryabinin <aryabinin@...tuozzo.com>,
Alexander Potapenko <glider@...gle.com>,
Dmitry Vyukov <dvyukov@...gle.com>, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-media@...r.kernel.org,
linux-wireless@...r.kernel.org,
kernel-build-reports@...ts.linaro.org,
"David S . Miller" <davem@...emloft.net>,
Arnd Bergmann <arnd@...db.de>
Subject: [PATCH 21/26] drm/bridge: ps8622: reduce stack size for KASAN
When CONFIG_KASAN is set, each call to ps8622_set() adds an object to the
stack frame, leading to a warning about possible stack overflow:
drivers/gpu/drm/bridge/parade-ps8622.c: In function 'ps8622_send_config':
drivers/gpu/drm/bridge/parade-ps8622.c:338:1: error: the frame size of 5872 bytes is larger than 3072 bytes [-Werror=frame-larger-than=]
Marking this as noinline_for_kasan completely avoids the problem.
Signed-off-by: Arnd Bergmann <arnd@...db.de>
---
drivers/gpu/drm/bridge/parade-ps8622.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/bridge/parade-ps8622.c b/drivers/gpu/drm/bridge/parade-ps8622.c
index ac8cc5b50d9f..6b995edd2a46 100644
--- a/drivers/gpu/drm/bridge/parade-ps8622.c
+++ b/drivers/gpu/drm/bridge/parade-ps8622.c
@@ -79,7 +79,7 @@ static inline struct ps8622_bridge *
return container_of(connector, struct ps8622_bridge, connector);
}
-static int ps8622_set(struct i2c_client *client, u8 page, u8 reg, u8 val)
+static noinline_for_kasan int ps8622_set(struct i2c_client *client, u8 page, u8 reg, u8 val)
{
int ret;
struct i2c_adapter *adap = client->adapter;
--
2.9.0
Powered by blists - more mailing lists