Index: contrib/arch/HelenOS.adl
===================================================================
--- contrib/arch/HelenOS.adl	(revision 71450c851fb728ac6d9a6f1118949d81152b67e9)
+++ contrib/arch/HelenOS.adl	(revision 05f5fbfc5c9c4326cfcfe05020160cd425e78353)
@@ -1,3 +1,3 @@
-system architecture HelenOS version 0.4.1 {
+system architecture HelenOS version 0.5.0 {
 	/* SPARTAN kernel */
 	inst kernel kernel;
Index: contrib/bazaar/bzreml/__init__.py
===================================================================
--- contrib/bazaar/bzreml/__init__.py	(revision 71450c851fb728ac6d9a6f1118949d81152b67e9)
+++ contrib/bazaar/bzreml/__init__.py	(revision 05f5fbfc5c9c4326cfcfe05020160cd425e78353)
@@ -102,8 +102,15 @@
 	return ""
 
+def iter_reverse_revision_history(repository, revision_id):
+	"""Iterate backwards through revision ids in the lefthand history"""
+	
+	graph = repository.get_graph()
+	stop_revisions = (None, _mod_revision.NULL_REVISION)
+	return graph.iter_lefthand_ancestry(revision_id, stop_revisions)
+
 def revision_sequence(branch, revision_old_id, revision_new_id):
 	"""Calculate a sequence of revisions"""
 	
-	for revision_ac_id in branch.repository.iter_reverse_revision_history(revision_new_id):
+	for revision_ac_id in iter_reverse_revision_history(branch.repository, revision_new_id):
 		if (revision_ac_id == revision_old_id):
 			break
Index: contrib/bazaar/mbprotect/__init__.py
===================================================================
--- contrib/bazaar/mbprotect/__init__.py	(revision 71450c851fb728ac6d9a6f1118949d81152b67e9)
+++ contrib/bazaar/mbprotect/__init__.py	(revision 05f5fbfc5c9c4326cfcfe05020160cd425e78353)
@@ -45,4 +45,11 @@
 from bzrlib.errors import TipChangeRejected
 
+def iter_reverse_revision_history(repository, revision_id):
+	"""Iterate backwards through revision ids in the lefthand history"""
+	
+	graph = repository.get_graph()
+	stop_revisions = (None, _mod_revision.NULL_REVISION)
+	return graph.iter_lefthand_ancestry(revision_id, stop_revisions)
+
 def pre_change_branch_tip(params):
 	repo = params.branch.repository
@@ -54,5 +61,5 @@
 	# First permitted case is appending changesets to main branch.Look for
 	# old tip in new main branch.
-	for revision_id in repo.iter_reverse_revision_history(params.new_revid):
+	for revision_id in iter_reverse_revision_history(repo, params.new_revid):
 		if revision_id == params.old_revid:
 			return	# Found old tip
@@ -60,5 +67,5 @@
 	# Another permitted case is backing out changesets. Look for new tip
 	# in old branch.
-	for revision_id in repo.iter_reverse_revision_history(params.old_revid):
+	for revision_id in iter_reverse_revision_history(repo, params.old_revid):
 		if revision_id == params.new_revid:
 			return	# Found new tip
Index: defaults/sparc64/ultra/Makefile.config
===================================================================
--- defaults/sparc64/ultra/Makefile.config	(revision 71450c851fb728ac6d9a6f1118949d81152b67e9)
+++ defaults/sparc64/ultra/Makefile.config	(revision 05f5fbfc5c9c4326cfcfe05020160cd425e78353)
@@ -4,2 +4,5 @@
 # CPU type
 PROCESSOR = us
+
+# Barebone build with essential binaries only
+CONFIG_BAREBONE = y
Index: release/Makefile
===================================================================
--- release/Makefile	(revision 71450c851fb728ac6d9a6f1118949d81152b67e9)
+++ release/Makefile	(revision 05f5fbfc5c9c4326cfcfe05020160cd425e78353)
@@ -33,5 +33,5 @@
 
 PROFILES = amd64 arm32/GXemul arm32/integratorcp arm32/gta02 ia32 \
-    ia64/i460GX ia64/ski mips32/GXemul mips32/msim sparc64/niagara \
+    ia64/i460GX ia64/ski mips32/GXemul mips32/msim ppc32 \
     sparc64/ultra
 
@@ -71,5 +71,5 @@
 release: src_rel
 	for profile in $(PROFILES); do \
-		$(MAKE) -C $(EXPORT_DIR) clean ; \
+		$(MAKE) -C $(EXPORT_DIR) distclean ; \
 		$(MAKE) -C $(EXPORT_DIR) PROFILE=$$profile ; \
 		$(MAKE) PROFILE=$$profile releasefile ; \
@@ -79,5 +79,5 @@
 	rm -rf $(EXPORT_DIR)
 	mkdir -p $(EXPORT_DIR)
-	$(BZR) export $(EXPORT_DIR)
+	$(BZR) export $(EXPORT_DIR) ../
 
 src_rel $(SRC_ARCHIVE): export
Index: uspace/lib/c/arch/amd64/include/elf_linux.h
===================================================================
--- uspace/lib/c/arch/amd64/include/elf_linux.h	(revision 71450c851fb728ac6d9a6f1118949d81152b67e9)
+++ uspace/lib/c/arch/amd64/include/elf_linux.h	(revision 05f5fbfc5c9c4326cfcfe05020160cd425e78353)
@@ -66,4 +66,16 @@
 	uint64_t rsp;
 	uint64_t ss;
+
+	/*
+	 * The following registers need to be part of elf_regs_t.
+	 * Unfortunately, we don't have any information about them in our
+	 * istate_t.
+	 */
+	uint64_t unused_fs_base;
+	uint64_t unused_gs_base;
+	uint64_t unused_ds;
+	uint64_t unused_es;
+	uint64_t unused_fs;
+	uint64_t unused_gs;
 } elf_regs_t;
 
@@ -91,4 +103,14 @@
 	elf_regs->rsp = istate->rsp;
 	elf_regs->ss = istate->ss;
+
+	/*
+	 * Reset the registers for which there is not enough info in istate_t.
+	 */
+	elf_regs->unused_fs_base = 0;
+	elf_regs->unused_gs_base = 0;
+	elf_regs->unused_ds = 0;
+	elf_regs->unused_es = 0;
+	elf_regs->unused_fs = 0;
+	elf_regs->unused_gs = 0;
 }
 
Index: uspace/srv/net/tcp/sock.c
===================================================================
--- uspace/srv/net/tcp/sock.c	(revision 71450c851fb728ac6d9a6f1118949d81152b67e9)
+++ uspace/srv/net/tcp/sock.c	(revision 05f5fbfc5c9c4326cfcfe05020160cd425e78353)
@@ -779,4 +779,9 @@
 	}
 
+	/* Grab recv_buffer_lock because of CV wait in tcp_sock_recv_fibril() */
+	fibril_mutex_lock(&socket->recv_buffer_lock);
+	socket->sock_core = NULL;
+	fibril_mutex_unlock(&socket->recv_buffer_lock);
+
 	rc = socket_destroy(NULL, socket_id, &client->sockets, &gsock,
 	    tcp_free_sock_data);
@@ -839,8 +844,9 @@
 	log_msg(LVL_DEBUG, "tcp_sock_recv_fibril()");
 
+	fibril_mutex_lock(&sock->recv_buffer_lock);
+
 	while (true) {
 		log_msg(LVL_DEBUG, "call tcp_uc_receive()");
-		fibril_mutex_lock(&sock->recv_buffer_lock);
-		while (sock->recv_buffer_used != 0)
+		while (sock->recv_buffer_used != 0 && sock->sock_core != NULL)
 			fibril_condvar_wait(&sock->recv_buffer_cv,
 			    &sock->recv_buffer_lock);
@@ -852,6 +858,6 @@
 			sock->recv_error = trc;
 			fibril_condvar_broadcast(&sock->recv_buffer_cv);
-			fibril_mutex_unlock(&sock->recv_buffer_lock);
-			tcp_sock_notify_data(sock->sock_core);
+			if (sock->sock_core != NULL)
+				tcp_sock_notify_data(sock->sock_core);
 			break;
 		}
@@ -861,7 +867,9 @@
 		sock->recv_buffer_used = data_len;
 		fibril_condvar_broadcast(&sock->recv_buffer_cv);
-		fibril_mutex_unlock(&sock->recv_buffer_lock);
-		tcp_sock_notify_data(sock->sock_core);
-	}
+		if (sock->sock_core != NULL)
+			tcp_sock_notify_data(sock->sock_core);
+	}
+
+	fibril_mutex_unlock(&sock->recv_buffer_lock);
 
 	tcp_uc_delete(sock->conn);
Index: version
===================================================================
--- version	(revision 71450c851fb728ac6d9a6f1118949d81152b67e9)
+++ version	(revision 05f5fbfc5c9c4326cfcfe05020160cd425e78353)
@@ -36,6 +36,6 @@
 
 VERSION = 0
-PATCHLEVEL = 4
-SUBLEVEL = 3
+PATCHLEVEL = 5
+SUBLEVEL = 0
 
 ifdef EXTRAVERSION
@@ -45,4 +45,4 @@
 endif
 
-NAME = Sashimi
+NAME = Fajtl
 COPYRIGHT = Copyright (c) 2001-2012 HelenOS project
