From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B2E7ECDB483 for ; Wed, 18 Oct 2023 13:19:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231539AbjJRNTO (ORCPT ); Wed, 18 Oct 2023 09:19:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33500 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231213AbjJRNTM (ORCPT ); Wed, 18 Oct 2023 09:19:12 -0400 Received: from mail-lf1-x132.google.com (mail-lf1-x132.google.com [IPv6:2a00:1450:4864:20::132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 12CE583; Wed, 18 Oct 2023 06:19:10 -0700 (PDT) Received: by mail-lf1-x132.google.com with SMTP id 2adb3069b0e04-504a7f9204eso9056959e87.3; Wed, 18 Oct 2023 06:19:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697635148; x=1698239948; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=HjzTimwqxjnhGfFjgtYHgr9Iodgd4DYN9W7dLb4ZLYg=; b=e/DVhHzlWH1dHvjekG4vT7N17/8vS4167OUBc6iMPeEWOi731HbX1aGVe0TMTrG66r 1cbcWSD/5Urs2DQP+LPn+AHljMzu26nnlZqEWKMu8H6LSrZqUFpm5g+vp9ZsyayXCuKb aWnebHseE4KPEzPBnrkJenzlW9n8xbeFsIdd/5JNUd4KKDKOKkId3VwQQ0CpZfw1lLN6 9ycII5NhZD/eHs3G2pjXuyrnO0U1ZByQuP/qn6KRZtbDM86iTFA/sLlvhdcbPsDrf+c1 R2S1MUPBNXymZkSI+ElWR5sSWbNqXICWdUqjGwY8DOwOYXFQL31LDfUr9T90hssgb8g2 9toA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697635148; x=1698239948; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=HjzTimwqxjnhGfFjgtYHgr9Iodgd4DYN9W7dLb4ZLYg=; b=QJ2Iq8vfJt39E8Oe+kbu6+vmDLAzIL6D58bHJP5WH6vpRqhGYFwSTMcMxRh/BpfsAE C/epC56XTSh7CPQo/h5mKnTShtizX8CnTweusDSS4ehlF7oOscquTC6t+SHwvEQro4cs 946Z2kSVFOLeKpMLkNIY3fplCZa7IBwr3qY7GGTHP7e3gSsdjEenPrSStyKVVLaF8tjl XrG81Y23g0WFMOz7D6lJnkgZ1UCLqWHw8CwYuLQ8lzUtDmXWrpCk1XgWKxznUicifYe3 uP+kNJ13YSQYM7/QjtJP29IqTdMHmqInEc9e8zL7ZOuCpqvVt6YIDOOaHRaK4bg1LDC0 k5Lg== X-Gm-Message-State: AOJu0Yyf4WxrEaAohwEFyg3fP3lExvnVyc0i48r5AK5KDqToL0GT9cu3 aDulWI6LO4Bn8inYgSddtag/ZWQkRRxLDA== X-Google-Smtp-Source: AGHT+IGoGVcybbNqA2cB5/NvcZjqpJi5gZyEcgh84aGE7VlwA69fC6EB/NdV5zPVM7/r7jwq8xPZxQ== X-Received: by 2002:a05:6512:3b21:b0:503:7fc:8afe with SMTP id f33-20020a0565123b2100b0050307fc8afemr5160105lfv.1.1697635147911; Wed, 18 Oct 2023 06:19:07 -0700 (PDT) Received: from [192.168.0.31] ([94.242.171.26]) by smtp.gmail.com with ESMTPSA id e23-20020a196917000000b00500b561285bsm708479lfc.292.2023.10.18.06.19.07 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 18 Oct 2023 06:19:07 -0700 (PDT) Message-ID: <9b82b0df-c4a9-40bc-8980-ac2494073fcd@gmail.com> Date: Wed, 18 Oct 2023 16:19:06 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2] audit: Send netlink ACK before setting connection in auditd_set Content-Language: en-US, ru-RU To: Chris Riches , audit@vger.kernel.org, Paul Moore , Eric Paris Cc: jonathan.davies@nutanix.com, linux-kernel@vger.kernel.org References: <20231018092351.195715-1-chris.riches@nutanix.com> <102df7b7-a07a-475a-adb6-ae60453feb63@gmail.com> From: Rinat Gadelshin In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 18.10.2023 15:49, Chris Riches wrote: > > On 18/10/2023 13:11, Rinat Gadelshin wrote: >>> -static void audit_receive(struct sk_buff *skb) >>> +static void audit_receive(struct sk_buff *skb) >>>   { >>>       struct nlmsghdr *nlh; >>> +    bool ack; >> Maybe we should initialize 'ack' as 'true' here? > That doesn't feel particularly useful to me. In fact, I think it's > actually clearer > uninitialised as a never-used initialisation could look like an > actually-used default. > We're guaranteed to initialise before use. > > - Chris Sorry, you are right. I've missed the following line: ack = nlh->nlmsg_flags & NLM_F_ACK; - Rinat