Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp3611955ybi; Mon, 10 Jun 2019 13:21:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqx7tgM71nwtLSkx+7kOYEOZDlnPeMbQyqwjhxBu0N0xsYj4/iX6qSShSQ+pm2Lu1adJQLh9 X-Received: by 2002:a17:902:2a69:: with SMTP id i96mr63326681plb.108.1560198089335; Mon, 10 Jun 2019 13:21:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560198089; cv=none; d=google.com; s=arc-20160816; b=e2mdFj1AKOHsQvJVzjqGQSS5iaqJ4Bmo3z4Rhr3rDfy23kp71qq00yHeiFw2ziILMV wk9eKM9cjoGPjYdM0HjE9OnjFbzlwAYg2nfQ9aromeMCeFKenSmMjHzfK+XtqnemwJah kiBXZ9UI9g7twly8TWKBpU02mwPqTDZkJEXqq8bE8ZQimiI31uPdurC/3OQTSQfNluP1 gheu/zRwXDDR9nj4rFhXbvR3mF64efy12PkOYOIJjB6eA5TihB8rjIFTk5P6CsUgFk21 12BJqzg/hW88J7HXSO+MIqmNMFen1pAJvgDj1SGJGor42erEsudHndlBW8uG16SBo7ch zu+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=9M6F3AKPv7OG6y2K7bhRRjnT8UdjtXCgz4Y9EEYL+yE=; b=bybUuhcif6mv65Z30V2/2GP14bscFA19IP7JSfwFmHYuvZq0QQRyiKaS8V6ldC2Kol uYB8XEKQbE/6v9zSiOZEN/Ko1H2SyMlojLfpVZUGKX9zKIoVk8NnNnKnpPFI1n6lpCie BrZxN5wsvqgVOzUbWSRnOryNQMcsthxgPkH/JdksK+zwOKu7q92szpWGFMt80SF4N1R1 3EsP6a9par/s2q3jnhDO66sxio8Z+WBbxkSyG4NjgWufs+V8SNCUM37FNJ9S9plWfW/U iybxChvzxcWIgB+kG2u3Dbpi5ShtbrgHLfprBjndB90V18w2/USMEC9QxRFBD0J3TRRz +5IA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@paul-moore-com.20150623.gappssmtp.com header.s=20150623 header.b=saZqork8; 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 g9si2343910plq.376.2019.06.10.13.21.14; Mon, 10 Jun 2019 13:21:29 -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=@paul-moore-com.20150623.gappssmtp.com header.s=20150623 header.b=saZqork8; 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 S2389449AbfFJUUm (ORCPT + 99 others); Mon, 10 Jun 2019 16:20:42 -0400 Received: from mail-lf1-f67.google.com ([209.85.167.67]:33394 "EHLO mail-lf1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728276AbfFJUUm (ORCPT ); Mon, 10 Jun 2019 16:20:42 -0400 Received: by mail-lf1-f67.google.com with SMTP id y17so7583314lfe.0 for ; Mon, 10 Jun 2019 13:20:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paul-moore-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=9M6F3AKPv7OG6y2K7bhRRjnT8UdjtXCgz4Y9EEYL+yE=; b=saZqork8B9+QM+f2nCfCrj8rlM59XPvq319ftaCyyiSzVlXueddIYsFl1oFOnoNHFM n0AF32FIdOPtpWRwUDR0aAqA5HtgbdAmdTn91dQADsTaS168kCRS3nSIu6NssjwXamcx o32tTM08DZGbBdZHIWl7VPJj+hvXJjegP1tRpW9ZjXONIohOHmzbE16SV2BqeldVXGk5 lTV7I6BCBpdqSxixsI4A2KZZVEySXl+5ULVAnFyY2xKZhBYNYIJgoYJTh7lBxgcetWqd rQPDEQXjgYy/yB7xj8+VVCTVFcsDRyyhhRl/Tv61GQGEJBOlxYBPJjU3FlWP1wgTFE/T JQWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=9M6F3AKPv7OG6y2K7bhRRjnT8UdjtXCgz4Y9EEYL+yE=; b=ewbLUEPjaFqSOh+9nk3P6xA7NPB1BoyUSAxD7rpWx531EVpD9WLOVpa6LNq1DRwIN+ q1HZgNIjplqG7WWd3DF51GncMbXPioPeDagTVdCe1oATy3K6sTxxA0Ygpiz2ah7aAg4I J49Rhtxmb9qXrxBjGs1M/Qqz6Y3tPpvgtB6DsTuIzZpyXYZaNx0saVG/DXJk9u7uuL45 H4Sbj4BJwMyAfhqz/FTYrM3EPe3cvuNARhY2sQT/eFrPGESuXTofsNcBAUoWYfj/pYaL G3DPG7hCZUXN8mWTsCAjPtLPGeRsAAc8SD5L6qhAV0aOmYnNYOgbUt3fF4kSXGNHpKEP xPTw== X-Gm-Message-State: APjAAAUlqlAaBsxqHccZi9KNy5wG8y21w7HidqH3jkXd4ufsNyWb4IMT QvJu0YH/7fRlTCZ+2oEk8xu5ZCe8wl76ZpSDcXxq X-Received: by 2002:ac2:410a:: with SMTP id b10mr18751609lfi.175.1560198039673; Mon, 10 Jun 2019 13:20:39 -0700 (PDT) MIME-Version: 1.0 References: <20190606085524.GA21119@zhanggen-UX430UQ> In-Reply-To: From: Paul Moore Date: Mon, 10 Jun 2019 16:20:28 -0400 Message-ID: Subject: Re: [PATCH v4] selinux: lsm: fix a missing-check bug in selinux_sb_eat_lsm_o pts() To: Ondrej Mosnacek , Gen Zhang Cc: Stephen Smalley , Eric Paris , selinux@vger.kernel.org, Linux kernel mailing list Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 7, 2019 at 4:41 AM Ondrej Mosnacek wrote: > > On Thu, Jun 6, 2019 at 10:55 AM Gen Zhang wrote: > > In selinux_sb_eat_lsm_opts(), 'arg' is allocated by kmemdup_nul(). It > > returns NULL when fails. So 'arg' should be checked. And 'mnt_opts' > > should be freed when error. > > > > Signed-off-by: Gen Zhang > > Fixes: 99dbbb593fe6 ("selinux: rewrite selinux_sb_eat_lsm_opts()") > > My comments about the subject and an empty line before label apply > here as well, but Paul can fix both easily when applying ... Since we've been discussing general best practices for submitting patches in this thread (and the other related thread), I wanted to (re)clarify my thoughts around maintainers fixing patches when merging them upstream. When in doubt, do not ever rely on the upstream maintainer fixing your patch while merging it, and if problems do arise during review, it is best to not ask the maintainer to fix them for you, but for you to fix them instead (you are the patch author after all!). Similarly, making comments along the lines of "X can fix both easily when applying", is also a bad thing to say when reviewing patches. It's the patch author's responsibility to fix the patch by address review comments, not the maintainer. I'll typically let you know if you don't need to rework a patch(set). That said, there are times when the maintainer will change the patch during merging, most of which are due to resolving merge conflicts/fuzz with changes already in the tree (that *is* the maintainer's responsibility). Speaking for myself, sometimes I will also make some minor changes if the patch author is away, or unreliable, or if there is a hard deadline near and I'm worried that the updated patch might not be ready in time. I'll also sometimes make the changes directly if the patch is holding up a larger, more important patch(set), but that is really rare. I'm sure I've made changes for other reasons in the past, and I'm sure I'll make changes for other reasons in the future, but hopefully this will give you a better idea of how the process works :) -- paul moore www.paul-moore.com