copy_to/from_user and a bottom half

From: Alex Ivchenko (aivchenko@ueidaq.com)
Date: Thu May 18 2000 - 11:53:07 EDT

  • Next message: Stephen C. Tweedie: "Re: Can O_SYNC be implemented by using fsync?"

    Hi,

    I tried to speed up a driver and moved copy_to_user()
    from ioctl to the bottom half of interrupt handler.

    access_ok() returns TRUE (of course, user address is valid), but
    copy_to_user() couldn't copy anything into the user space.

    bh is sched like:
            queue_task(&pd_bh_task, &tq_immediate);
            mark_bh(IMMEDIATE_BH);

    and spin_lock_irqsave() is NOT used in bh as well as any other
    sync stuff.

    I assumed that if lock is not set kernel could use exception handlers
    (according to Documentation/exception.txt) to get user space mem page.

    Could you tell me what is wrong?

    Thanks,
    Alex

    --
    Alex Ivchenko, Ph.D.
    United Electronic Industries, Inc.
    "The High-Performance Alternative (tm)"
    --
    10 Dexter Avenue
    Watertown, Massachusetts 02472
    Tel: (617) 924-1155 x 222 Fax: (617) 924-1441
    http://www.ueidaq.com
    

    - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



    This archive was generated by hypermail 2b29 : Thu May 18 2000 - 12:30:31 EDT