<p dir="ltr">I didn't know it, but I had my poll and write messages switched in userland under await and send signal implementations of types. Sorry, it works now, it wasn't the kernel land repeatedly executing it. I wasn't sure, so I was still debugging. Anyway, thanks a lot though.</p>
<div class="gmail_extra"><br><div class="gmail_quote">On Oct 5, 2016 2:29 AM, "Martin Kletzander" <<a href="mailto:mkletzan@redhat.com">mkletzan@redhat.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Tue, Oct 04, 2016 at 05:05:57PM +0200, Greg KH wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Tue, Oct 04, 2016 at 10:58:16AM -0400, Kenneth Adam Miller wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I have a character device that I am calling write on and which is succeeding,<br>
but which is repeatedly executing. I have hard coded the return value to one,<br>
</blockquote></blockquote>
<br>
Correct me if I'm wrong, I'm just a self-thought newbie, but this ^^<br>
sounds to me like the problem. Because the write should return how many<br>
bytes were written (or error), the function is being called until it's<br>
been all written. If you just want to be called once and you don't care<br>
what the data are (which is the weird thing in the first place), I think<br>
you should return the length you got as an argument.<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
so I don't think the userland standard library is retrying but I could be<br>
wrong. Can anybody tell me why write would be re-executed by the kernel and how<br>
to fix it? I dont actually copy_from_user, I just need this in order to signal<br>
kernel land.<br>
</blockquote>
<br>
Do you have a pointer to your code somewhere? This is a very common bug<br>
that people have...<br>
<br>
thanks,<br>
<br>
greg k-h<br>
<br>
______________________________<wbr>_________________<br>
Kernelnewbies mailing list<br>
<a href="mailto:Kernelnewbies@kernelnewbies.org" target="_blank">Kernelnewbies@kernelnewbies.or<wbr>g</a><br>
<a href="https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies" rel="noreferrer" target="_blank">https://lists.kernelnewbies.or<wbr>g/mailman/listinfo/kernelnewbi<wbr>es</a><br>
</blockquote>
</blockquote></div></div>