netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* "af_unix: conditionally use freezable blocking calls in read" is wrong
@ 2016-12-04 21:04 Al Viro
  2016-12-05  2:42 ` David Miller
  0 siblings, 1 reply; 5+ messages in thread
From: Al Viro @ 2016-12-04 21:04 UTC (permalink / raw)
  To: netdev; +Cc: Cong Wang

	Could we please kill that kludge?  "af_unix: use freezable blocking
calls in read" had been wrong to start with; having a method make assumptions
of that sort ("nobody will call me while holding locks I hadn't thought of")
is asking for serious trouble.  splice is just a place where lockdep has
caught that - we *can't* assume that nobody will ever call kernel_recvmsg()
while holding some locks.

	I've run into that converting AF_UNIX to generic_file_splice_read();
I can kludge around that ("freezable unless ->msg_iter is ITER_PIPE"), but
that only delays trouble.

	Note that the only other user of freezable_schedule_timeout() is
a very different story - it's a kernel thread, which *does* have a guaranteed
locking environment.  Making such assumptions in unix_stream_recvmsg(),
OTOH, is insane...

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

end of thread, other threads:[~2016-12-06 18:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-04 21:04 "af_unix: conditionally use freezable blocking calls in read" is wrong Al Viro
2016-12-05  2:42 ` David Miller
2016-12-05  3:52   ` Al Viro
2016-12-06  4:24     ` Cong Wang
2016-12-06 18:37       ` Colin Cross

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).