// $Header$ // Kernel Version: // VERSION = 2 // PATCHLEVEL = 6 // SUBLEVEL = 5 // EXTRAVERSION = -mm3 --- 2.6/ipc/compat_mq.c 2004-04-10 09:59:40.000000000 +0200 +++ build-2.6/ipc/compat_mq.c 2004-04-10 13:15:40.414231437 +0200 @@ -139,6 +139,7 @@ { mm_segment_t oldfs; struct sigevent notification; + char cookie[NOTIFY_COOKIE_LEN]; long ret; if (!u_notification) @@ -147,6 +148,14 @@ if (get_compat_sigevent(¬ification, u_notification)) return -EFAULT; + if (notification.sigev_notify == SIGEV_THREAD) { + if (copy_from_user(cookie, u_notification.sigev_value.sival_ptr, + NOTIFY_COOKIE_LEN)) { + return -EFAULT; + } + notification.sigev_value.sival_ptr = cookie; + } + oldfs = get_fs(); set_fs(KERNEL_DS); ret = sys_mq_notify(mqdes, ¬ification);