Received: by mail.netbsd.org (Postfix, from userid 605) id 29F7C84E59; Thu, 30 Nov 2017 14:57:38 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id 9792184E5D for ; Thu, 30 Nov 2017 14:57:37 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([IPv6:::1]) by localhost (mail.netbsd.org [IPv6:::1]) (amavisd-new, port 10025) with ESMTP id UTZzBlGdzf9c for ; Thu, 30 Nov 2017 14:57:37 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.netbsd.org [199.233.217.197]) by mail.netbsd.org (Postfix) with ESMTP id EBC7184D20 for ; Thu, 30 Nov 2017 14:57:36 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id E2D4EFB40; Thu, 30 Nov 2017 14:57:34 +0000 (UTC) Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" MIME-Version: 1.0 Date: Thu, 30 Nov 2017 14:57:34 +0000 From: "Martin Husemann" Subject: CVS commit: [netbsd-8] src/sys/netipsec To: source-changes@NetBSD.org X-Mailer: log_accum Message-Id: <20171130145734.E2D4EFB40@cvs.NetBSD.org> Sender: source-changes-owner@NetBSD.org List-Id: source-changes.NetBSD.org Precedence: bulk Reply-To: source-changes-d@NetBSD.org Mail-Reply-To: "Martin Husemann" Mail-Followup-To: source-changes-d@NetBSD.org List-Unsubscribe: Module Name: src Committed By: martin Date: Thu Nov 30 14:57:34 UTC 2017 Modified Files: src/sys/netipsec [netbsd-8]: ipsec.c key.c key.h Log Message: Pull up following revision(s) (requested by ozaki-r in ticket #406): sys/netipsec/key.c: revision 1.239 sys/netipsec/key.c: revision 1.240 sys/netipsec/key.c: revision 1.241 sys/netipsec/key.c: revision 1.242 sys/netipsec/key.h: revision 1.33 sys/netipsec/ipsec.c: revision 1.123 sys/netipsec/key.c: revision 1.236 sys/netipsec/key.c: revision 1.237 sys/netipsec/key.c: revision 1.238 Provide a function to call MGETHDR and MCLGET The change fixes two usages of MGETHDR that don't check whether a mbuf is really allocated before passing it to MCLGET. Fix error handling of MCLGET in key_alloc_mbuf Add missing splx to key_spdexpire Use M_WAITOK to allocate mbufs wherever sleepable Further changes will get rid of unnecessary NULL checks then. Get rid of unnecessary NULL checks that are obsoleted by M_WAITOK Simply the code by avoiding unnecessary error checks - Remove unnecessary m_pullup for self-allocated mbufs - Replace some if-fails-return sanity checks with KASSERT Call key_sendup_mbuf immediately unless key_acquire is called in softint We need to defer it only if it's called in softint to avoid deadlock. To generate a diff of this commit: cvs rdiff -u -r1.99.2.1 -r1.99.2.2 src/sys/netipsec/ipsec.c cvs rdiff -u -r1.163.2.2 -r1.163.2.3 src/sys/netipsec/key.c cvs rdiff -u -r1.19.2.1 -r1.19.2.2 src/sys/netipsec/key.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.