lkml.org 
[lkml]   [2023]   [Oct]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    SubjectRe: [PATCH v2] audit: Send netlink ACK before setting connection in auditd_set
    From
    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

    \
     
     \ /
      Last update: 2023-10-18 15:19    [W:6.578 / U:0.012 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site