kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
* In a process context kernel_read returns -EINTR, how to proceed?
@ 2018-12-20 10:33 Lev Olshvang
  2018-12-20 16:40 ` valdis.kletnieks
  0 siblings, 1 reply; 7+ messages in thread
From: Lev Olshvang @ 2018-12-20 10:33 UTC (permalink / raw)
  To: kernelnewbies

Hi All,

I use kernel_read to read  file in chunks of 4K size in a process context
On several files, like libc, libm,  I got -EINTR error.

Then I repeated the attempt limited number of times but still on every read attempt I got -EINTR

I do not understand who may interrupt such a small read, I suppose these libraries are already mapped in other processes so no real I/O should be done.

In a user space it is recommended to repeat syscall, what is the proper course of action in kernel.
As I stated, this code is not in a kernel thread or atomic context, it is in a process context so a tried  before next attempt yield() but to no success.

Waiting for your advises.
Thx,
Lev


_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-12-23  8:53 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-20 10:33 In a process context kernel_read returns -EINTR, how to proceed? Lev Olshvang
2018-12-20 16:40 ` valdis.kletnieks
2018-12-21 13:51   ` Lev Olshvang
2018-12-21 14:00     ` Greg KH
2018-12-21 16:15     ` valdis.kletnieks
2018-12-23  8:41       ` Lev Olshvang
2018-12-23  8:53         ` valdis.kletnieks

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).