From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755573AbcDDSPd (ORCPT ); Mon, 4 Apr 2016 14:15:33 -0400 Received: from mail-pa0-f42.google.com ([209.85.220.42]:34635 "EHLO mail-pa0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754398AbcDDSPb (ORCPT ); Mon, 4 Apr 2016 14:15:31 -0400 To: Mauro Carvalho Chehab Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org From: Laura Abbott Subject: Incorrect use of blocking ops in lirc_dev_fop_read Message-ID: <5702AF37.7070100@redhat.com> Date: Mon, 4 Apr 2016 11:15:19 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, We received a bug report (https://bugzilla.redhat.com/show_bug.cgi?id=1323440) WARNING: CPU: 3 PID: 765 at kernel/sched/core.c:7557 __might_sleep+0x75/0x80() do not call blocking ops when !TASK_RUNNING; state=1 set at [] lirc_dev_fop_read+0x1e1/0x590 [lirc_dev] CPU: 3 PID: 765 Comm: lircd Not tainted 4.4.5-300.fc23.x86_64+debug #1 Hardware name: /NUC5PPYB, BIOS PYBSWCEL.86A.0031.2015.0601.1712 06/01/2015 0000000000000286 00000000d9104369 ffff8801742bfc90 ffffffff8142b543 ffff8801742bfcd8 ffffffff81c893ec ffff8801742bfcc8 ffffffff810aef42 ffffffffa03b4428 00000000000002dc 0000000000000000 ffff88007640d380 Call Trace: [] dump_stack+0x85/0xc2 [] warn_slowpath_common+0x82/0xc0 [] warn_slowpath_fmt+0x5c/0x80 [] ? _raw_spin_unlock_irqrestore+0x36/0x60 [] ? lirc_dev_fop_read+0x1e1/0x590 [lirc_dev] [] ? lirc_dev_fop_read+0x1e1/0x590 [lirc_dev] [] __might_sleep+0x75/0x80 [] __might_fault+0x43/0xa0 [] lirc_dev_fop_read+0x491/0x590 [lirc_dev] [] ? trace_hardirqs_on+0xd/0x10 [] ? wake_up_q+0x70/0x70 [] __vfs_read+0x37/0x100 [] ? security_file_permission+0xa3/0xc0 [] vfs_read+0x89/0x130 [] SyS_read+0x58/0xd0 [] entry_SYSCALL_64_fastpath+0x12/0x76 From looking at the code, it looks like the issue is that copy_to_user may be called within the block of TASK_INTERRUPTIBLE. I don't know the code well enough to try and propose a patch to fix this (I broke code last time I tried to fix something like this) Thanks, Laura