Char device write repeating

Daniel. danielhilst at gmail.com
Tue Oct 4 14:42:52 EDT 2016


Because the libc is calling it again based on what has been passed as
argument and what was received as return value. Here is one example
https://gist.github.com/gkos/5479135. I don't really know if this code is
working since I made it a long time ago.

Regards,

2016-10-04 12:05 GMT-03:00 Greg KH <greg at kroah.com>:

> On Tue, Oct 04, 2016 at 10:58:16AM -0400, Kenneth Adam Miller wrote:
> > I have a character device that I am calling write on and which is
> succeeding,
> > but which is repeatedly executing. I have hard coded the return value to
> one,
> > so I don't think the userland standard library is retrying but I could be
> > wrong. Can anybody tell me why write would be re-executed by the kernel
> and how
> > to fix it? I dont actually copy_from_user, I just need this in order to
> signal
> > kernel land.
>
> Do you have a pointer to your code somewhere?  This is a very common bug
> that people have...
>
> thanks,
>
> greg k-h
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>



-- 
*"Do or do not. There is no try"*
  *Yoda Master*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20161004/40f3829d/attachment.html 


More information about the Kernelnewbies mailing list