trem wrote:
 > +    mlockall(MCL_CURRENT | MCL_FUTURE);

Please show people the right way to code, check the return value of
mlockall here.

 > +    if (rtdm_safe_copy_to_user(user_info, buf, buffer.data, size))
 > +            rtdm_printk("ERROR : can't copy data from driver\n");
 > +
 > +    /* clean the kernel buffer */
 > +    buffer.size = 0;
 > +
 > +    return size;

Same here, if rtdm_safe_copy_to_user returns an error, return that error
to user-space.



-- 


                                            Gilles Chanteperdrix.

_______________________________________________
Xenomai-core mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-core

Reply via email to