From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Fastabend Subject: [bpf PATCH 0/2] sockmap, syzbot fix error path and RCU fix Date: Sat, 30 Jun 2018 06:51:26 -0700 Message-ID: <20180630134148.6395.64795.stgit@john-Precision-Tower-5810> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, kafai@fb.com To: ast@kernel.org, daniel@iogearbox.net Return-path: Received: from [184.63.162.180] ([184.63.162.180]:53222 "EHLO john-Precision-Tower-5810" rhost-flags-FAIL-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1751074AbeF3N5A (ORCPT ); Sat, 30 Jun 2018 09:57:00 -0400 Sender: netdev-owner@vger.kernel.org List-ID: This applies on top of "BPF fixes for sockhash" I just didn't want to confuse that series yet again by re-ordering/adding these patches in it I missed fixing the error path in the sockhash code to align with supporting socks in multiple maps. Simply checking if the psock is present does not mean we can decrement the reference count because it could be part of another map. Fix this by cleaning up the error path so this situation does not happen. As far as I know this should be the last fix to the fallout from relaxing the single map restriction. Sorry about the multiple fixes but these patches were all written before the initial submission then converted and I missed this detail. But at least we caught these early in the net cycle. Will continue reviewing/testing however to see if we catch anything else. Also we need one more series to check ESTABLISH state as Eric noted. That will be sent out shortly just going over the patches once more. The ESTABLISH/unhash fix is also needed in kTLS. --- John Fastabend (2): bpf: sockmap, error path can not release psock in multi-map case bpf: sockmap, hash table is RCU so readers do not need locks 0 files changed