Received: by 2002:ac0:a874:0:0:0:0:0 with SMTP id c49csp445852ima; Fri, 15 Mar 2019 06:28:57 -0700 (PDT) X-Google-Smtp-Source: APXvYqxhrfUjfQYOXnF7XFmsxzYQ7h14yL7sHvYDk360HeOjUPd03YCkLje70Xgz2UaXZBmx2LVU X-Received: by 2002:a63:204d:: with SMTP id r13mr3476012pgm.63.1552656537000; Fri, 15 Mar 2019 06:28:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552656536; cv=none; d=google.com; s=arc-20160816; b=WfbmoDtmOjGUN/PM/aaOWaf6JNwzpKBBCiKP5sCp/NlqKKri+ouRC5cuR9lbuBxLQv 7ZfCKO9l+RV0gZJug81bEhnFurzbIocPiVbxJnZ1uR3yRjC8XrHL1yRGRC3X+BeRX/Uy zcGvFP742uHSPHLbT4eviwNDXJAZZVCFNKWm95t3MZdwRf3Io2vjtOFpbqboTXZyXwhd IEviDGEY7WlpLU8mK2oB+yu9KYbFQrkG29gAApZ2zC0seOj45/Mb9KDLHYIflTFP8896 KQ0JuPhn8JJSG6egvr3QrjqSO5vYCTbOPK3p3qAxq8AMAfG0ECjTU/sxS3FoXKn29fS1 /uHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=No1HWm0EsCJCKhgJLbb3/U/NHO8sMm1k/TSYX8LGc6Q=; b=ab44TBShX/g2mkSmRscR0qUIpr/IAS/ypPbS2xyehEgGpxkNmEAccxYWt6aFCk+aBd VOC2sucD9eq0JTsI4zFHIJrGuuhPVjBxVc554ueiBAuhTe/N8JyNiGovSDLMBlN7P7m/ eHxXfyyM465630RXvVPgRw9IZni3bSuYT7C0MKTxNjeOL9ZcSKpViqDkOSu0WRMolvHb OKl2zv/+pJrWnYrndm09l4nl2BfBs9TAITBjmuhar5gEs+PxFKZBVE+s3yOxz3j+2gaN BDjuDEYpks6flScw72HKEEp/PFn9yzTRRzb2Gv5zwLesAa4Ai1kbRc2S7Cnqi2pfBuGx ZGwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@toxicpanda-com.20150623.gappssmtp.com header.s=20150623 header.b=DOm3k7xY; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n14si1806732pgv.520.2019.03.15.06.28.41; Fri, 15 Mar 2019 06:28:56 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@toxicpanda-com.20150623.gappssmtp.com header.s=20150623 header.b=DOm3k7xY; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728412AbfCON1o (ORCPT + 99 others); Fri, 15 Mar 2019 09:27:44 -0400 Received: from mail-qt1-f170.google.com ([209.85.160.170]:34898 "EHLO mail-qt1-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726468AbfCON1o (ORCPT ); Fri, 15 Mar 2019 09:27:44 -0400 Received: by mail-qt1-f170.google.com with SMTP id h39so10039520qte.2 for ; Fri, 15 Mar 2019 06:27:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=toxicpanda-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=No1HWm0EsCJCKhgJLbb3/U/NHO8sMm1k/TSYX8LGc6Q=; b=DOm3k7xYFoHXos1RvdmIdXhpBQAYPDHy9rp4+wXKTEfosJSu0x0usHOezzegKlg5lh Ske6dLEJgMQKVQFaW8LHTxi3i5eVwP++jO/HwV/CrcQ33PGMm/GQq7rAsQaSc5o+fO8j 2G4U77ocq1EW+UXUBlVKzqC++Mo/UEIai9wlgPwumMOAnnYuKt+KYDdvJ4srvty/z94H AjBwnrDbO/NhfPKs+Rtpwv9fKSYRadkgrLLyZakDUssdgdUV76+HvwXQTldCAjVTrYR0 Vjk3qQIq2ezdv7ZO+QwAJhwLJIjLE2SvFyTyTz4iqjzmAzvW+oeRBs/4BF9BsJ0klKTO TgUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=No1HWm0EsCJCKhgJLbb3/U/NHO8sMm1k/TSYX8LGc6Q=; b=IIVjnWh8ukeubeXaKH+L5GoJ5Sd8rwf9Wa/8L3tkas0jGiDuozxXbdGzFI7FgqMfBi 2/hIS2+j6cJdeOx3OMVuDnYCGBcUz8M7X6gGNosz3kBTKIMLuK8dZ2Q06y/5W1kPwIaa uLqUSTm8Pym1yV4+42MS3pt4m4iDhPwJwX7RmXVaBfJY9XCBtN+dG2IBPx9pf8Dus+ZX Ys3oJ/Z653SxgF6LlPWw9LnQzYxRU5w+zSbjm8BW897O3uERfZZV0v1tdNLDsKJAHWAE EDyjJpsgyma+K5Wf+BHEt+CKHQVbuzx84Eb1V0Jx7Ut0Zpfxv/RwH2ehByvTJt3gGbyD v3fA== X-Gm-Message-State: APjAAAVtSaLMdX61wmrmjY7p3RMoTmY0cDdGuhqG+/tsZteaHUtdEJcf 3t5vqNMl6tr/AhjPl82Bztjhmg== X-Received: by 2002:a0c:b89e:: with SMTP id y30mr2557406qvf.52.1552656463123; Fri, 15 Mar 2019 06:27:43 -0700 (PDT) Received: from localhost ([107.15.81.208]) by smtp.gmail.com with ESMTPSA id w33sm1438382qth.34.2019.03.15.06.27.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 15 Mar 2019 06:27:42 -0700 (PDT) Date: Fri, 15 Mar 2019 09:27:40 -0400 From: Josef Bacik To: Kangjie Lu Cc: pakki001@umn.edu, Josef Bacik , Jens Axboe , linux-block@vger.kernel.org, nbd@other.debian.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] block: nbd: fix a missing check for nla_nest_start Message-ID: <20190315132739.mfnbkp5vdjx2uhko@MacBook-Pro-91.local> References: <20190315063138.17666-1-kjlu@umn.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190315063138.17666-1-kjlu@umn.edu> User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 15, 2019 at 01:31:38AM -0500, Kangjie Lu wrote: > nla_nest_start may fail and thus deserves a check. > > The fix inserts such a check and exits gracefully in case it > fails. > Except it won't because we pre-reserve enough space for that attr. Subsequent calls could fail, and those are checked properly, but this one won't. Thanks, Josef