Showing error 540

User: Jiri Slaby
Error type: Calling function from invalid context
Error type description: Some function is called at inappropriate place like sleep inside critical sections or interrupt handlers
File location: drivers/block/floppy.c
Line in file: 890
Project: Linux Kernel
Project version: 2.6.28
Tools: Stanse (1.2)
Entered: 2011-11-07 22:19:02 UTC


Source:

 860        set_dor(fdc, ~0, 8);
 861#if N_FDC > 1
 862        set_dor(1 - fdc, ~8, 0);
 863#endif
 864        if (FDCS->rawcmd == 2)
 865                reset_fdc_info(1);
 866        if (fd_inb(FD_STATUS) != STATUS_READY)
 867                FDCS->reset = 1;
 868}
 869
 870/* locks the driver */
 871static int _lock_fdc(int drive, int interruptible, int line)
 872{
 873        if (!usage_count) {
 874                printk(KERN_ERR
 875                       "Trying to lock fdc while usage count=0 at line %d\n",
 876                       line);
 877                return -1;
 878        }
 879
 880        if (test_and_set_bit(0, &fdc_busy)) {
 881                DECLARE_WAITQUEUE(wait, current);
 882                add_wait_queue(&fdc_wait, &wait);
 883
 884                for (;;) {
 885                        set_current_state(TASK_INTERRUPTIBLE);
 886
 887                        if (!test_and_set_bit(0, &fdc_busy))
 888                                break;
 889
 890                        schedule();
 891
 892                        if (!NO_SIGNAL) {
 893                                remove_wait_queue(&fdc_wait, &wait);
 894                                return -EINTR;
 895                        }
 896                }
 897
 898                set_current_state(TASK_RUNNING);
 899                remove_wait_queue(&fdc_wait, &wait);
 900                flush_scheduled_work();
Show full sources