diff --git a/kernel.spec b/kernel.spec index 4b881a8f1..3138b159e 100644 --- a/kernel.spec +++ b/kernel.spec @@ -628,6 +628,9 @@ Patch26250: HID-rmi-Disable-populating-F30-when-the-touchpad-has.patch # rhbz 1192270 Patch26251: ideapad_laptop-Lenovo-G50-30-fix-rfkill-reports-wire.patch +# rhbz 1180920 1206724 +Patch26252: pcmcia-fix-a-boot-time-warning-in-pcmcia-cs-code.patch + # END OF PATCH DEFINITIONS %endif @@ -1374,6 +1377,9 @@ ApplyPatch HID-rmi-Disable-populating-F30-when-the-touchpad-has.patch # rhbz 1192270 ApplyPatch ideapad_laptop-Lenovo-G50-30-fix-rfkill-reports-wire.patch +# rhbz 1180920 1206724 +ApplyPatch pcmcia-fix-a-boot-time-warning-in-pcmcia-cs-code.patch + # END OF PATCH APPLICATIONS %endif @@ -2224,6 +2230,9 @@ fi # # %changelog +* Thu Jul 23 2015 Laura Abbott +- Fix warning from pcmcia (rhbz 1180920 1206724) + * Wed Jul 22 2015 Laura Abbott - 4.1.3-200 - Add patches for Ideapad RF switches (rhbz 1192270) diff --git a/pcmcia-fix-a-boot-time-warning-in-pcmcia-cs-code.patch b/pcmcia-fix-a-boot-time-warning-in-pcmcia-cs-code.patch new file mode 100644 index 000000000..fab3d2708 --- /dev/null +++ b/pcmcia-fix-a-boot-time-warning-in-pcmcia-cs-code.patch @@ -0,0 +1,66 @@ +From d3046ba809ce4a3c34d605000cdce48c6ba54b6c Mon Sep 17 00:00:00 2001 +From: Dmitry Eremin-Solenikov +Date: Mon, 30 Mar 2015 14:33:45 +0300 +Subject: [PATCH] pcmcia: fix a boot time warning in pcmcia cs code + +During bootup pcmcia (pccardd) code enforces the following warning +backtrace: + +do not call blocking ops when !TASK_RUNNING; state=1 set at [] pccardd+0xb8/0x3fc +Modules linked in: +CPU: 0 PID: 14 Comm: pccardd Not tainted 4.0.0-rc6+ #11 +Hardware name: Sharp-Collie +[] (unwind_backtrace) from [] (show_stack+0x10/0x14) +[] (show_stack) from [] (warn_slowpath_common+0x74/0xac) +[] (warn_slowpath_common) from [] (warn_slowpath_fmt+0x30/0x40) +[] (warn_slowpath_fmt) from [] (__might_sleep+0x84/0xa0) +[] (__might_sleep) from [] (mutex_lock_nested+0x24/0x388) +[] (mutex_lock_nested) from [] (pccardd+0xf8/0x3fc) +[] (pccardd) from [] (kthread+0xdc/0xfc) +[] (kthread) from [] (ret_from_fork+0x14/0x2c) +---[ end trace fd94911637eed4ba ]--- + +This happens due to kthread trying to lock mutex in a TASK_INTERRUPTIBLE +state. Limit TASK_INTERRUPTIBLE task state to the schedule() call only, +so that the rest of the code runs in TASK_RUNNING state. + +Signed-off-by: Dmitry Eremin-Solenikov +Signed-off-by: Greg Kroah-Hartman +--- + drivers/pcmcia/cs.c | 10 ++++++---- + 1 file changed, 6 insertions(+), 4 deletions(-) + +diff --git a/drivers/pcmcia/cs.c b/drivers/pcmcia/cs.c +index 5292db6..367d45e 100644 +--- a/drivers/pcmcia/cs.c ++++ b/drivers/pcmcia/cs.c +@@ -626,8 +626,6 @@ static int pccardd(void *__skt) + unsigned int events; + unsigned int sysfs_events; + +- set_current_state(TASK_INTERRUPTIBLE); +- + spin_lock_irqsave(&skt->thread_lock, flags); + events = skt->thread_events; + skt->thread_events = 0; +@@ -675,11 +673,15 @@ static int pccardd(void *__skt) + if (kthread_should_stop()) + break; + ++ set_current_state(TASK_INTERRUPTIBLE); ++ + schedule(); ++ ++ /* make sure we are running */ ++ __set_current_state(TASK_RUNNING); ++ + try_to_freeze(); + } +- /* make sure we are running before we exit */ +- set_current_state(TASK_RUNNING); + + /* shut down socket, if a device is still present */ + if (skt->state & SOCKET_PRESENT) { +-- +2.4.3 +