/[base]
ViewVC logotype

Revision 279588


Jump to revision: Previous Next
Author: ae
Date: Wed Mar 4 11:20:01 2015 UTC (9 years, 4 months ago)
Changed paths: 4
Log Message:
Fix deadlock in IPv6 PCB code.

When several threads are trying to send datagram to the same destination,
but fragmentation is disabled and datagram size exceeds link MTU,
ip6_output() calls pfctlinput2(PRC_MSGSIZE). It does notify all
sockets wanted to know MTU to this destination. And since all threads
hold PCB lock while sending, taking the lock for each PCB in the
in6_pcbnotify() leads to deadlock.

RFC 3542 p.11.3 suggests notify all application wanted to receive
IPV6_PATHMTU ancillary data for each ICMPv6 packet too big message.
But it doesn't require this, when we don't receive ICMPv6 message.

Change ip6_notify_pmtu() function to be able use it directly from
ip6_output() to notify only one socket, and to notify all sockets
when ICMPv6 packet too big message received.

PR:		197059
Differential Revision:	https://reviews.freebsd.org/D1949
Reviewed by:	no objection from #network
Obtained from:	Yandex LLC
MFC after:	1 week
Sponsored by:	Yandex LLC


Changed paths

Path Details
Directoryhead/sys/netinet6/in6_pcb.c modified , text changed
Directoryhead/sys/netinet6/ip6_input.c modified , text changed
Directoryhead/sys/netinet6/ip6_output.c modified , text changed
Directoryhead/sys/netinet6/ip6_var.h modified , text changed

  ViewVC Help
Powered by ViewVC 1.1.27