[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-id: <1411732241-5212-1-git-send-email-k.kozlowski@samsung.com>
Date: Fri, 26 Sep 2014 13:50:40 +0200
From: Krzysztof Kozlowski <k.kozlowski@...sung.com>
To: MyungJoo Ham <myungjoo.ham@...sung.com>,
Chanwoo Choi <cw00.choi@...sung.com>,
Felipe Balbi <balbi@...com>,
Sangjung Woo <sangjung.woo@...sung.com>,
Krzysztof Kozlowski <k.kozlowski@...sung.com>,
linux-kernel@...r.kernel.org,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Jingoo Han <jg1.han@...sung.com>
Cc: Kyungmin Park <kyungmin.park@...sung.com>,
Marek Szyprowski <m.szyprowski@...sung.com>,
Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>
Subject: [RFC PATCH] extcon: Fix sleeping in atomic context
Hi,
When kernel was built with charger manager and extcon, I encountered
a sleep in atomic context after connecting USB cable to the device.
I found this on internal kernel 3.16 on Exynos3250 development board.
Unfortunately I could not reproduce it on mainline kernel because
none of my boards were able to bring up full charging stack
(fuel gauge, charger, charger-manager, extcon).
However, after looking at source code, this should happen also on
mainline kernel.
The fix for bug is simple - use mutexes instead of spin locks. It was
tested on 3.16 but *should* work on mainline.
My questions/request for comments are:
1. Could someone verify this on mainline (test it)?
2. Should I mark it cc-stable? I think yes *but* the patch changes
few extcon functions from non-sleeping to might_sleep.
On mainline these affected functions are not used in atomic
contexts but I am not sure about older stable kernels.
Applying this to older kernel could lead to another sleep-in-atomic
issue...
Any comments?
Best regards,
Krzysztof
Krzysztof Kozlowski (1):
extcon: Fix sleeping in atomic context after connecting USB cable
drivers/extcon/extcon-class.c | 15 ++++++++-------
include/linux/extcon.h | 3 ++-
2 files changed, 10 insertions(+), 8 deletions(-)
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists