Changeset e06da7e in mainline for kernel/generic/src/ipc/sysipc.c


Ignore:
Timestamp:
2009-03-07T15:59:32Z (16 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
411b6a6
Parents:
b11ee88
Message:

If the server cannot receive a call because it supplied a bad userspace address, the kernel will immediately answer the call with EPARTY.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/ipc/sysipc.c

    rb11ee88 re06da7e  
    937937         * copy whole call->data, not only call->data.args */
    938938        if (STRUCT_TO_USPACE(calldata, &call->data)) {
    939                 /* XXX
    940                  * To avoid deadlocks in synchronous calls
    941                  * this should be replaced by discarding
    942                  * the call and notifying the caller.
     939                /*
     940                 * The callee will not receive this call and no one else has
     941                 * a chance to answer it. Reply with the EPARTY error code.
    943942                 */
     943                ipc_data_t saved_data;
     944                int saveddata = 0;
     945
     946                if (answer_need_old(call)) {
     947                        memcpy(&saved_data, &call->data, sizeof(call->data));
     948                        saveddata = 1;
     949                }
     950               
     951                IPC_SET_RETVAL(call->data, EPARTY);
     952                (void) answer_preprocess(call, saveddata ? &saved_data : NULL);
     953                ipc_answer(&TASK->answerbox, call);
    944954                return 0;
    945955        }
Note: See TracChangeset for help on using the changeset viewer.