Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1632392

Re: Boot regression caused by kauditd

From Cong Wang <xiyou.wangcong@gmail.com>
Newsgroups linux.kernel
Subject Re: Boot regression caused by kauditd
Date 2017-04-27 23:50 +0200
Message-ID <tAZsu-6vN-13@gated-at.bofh.it> (permalink)
References <tAC2R-7gR-5@gated-at.bofh.it> <tACFz-7Oy-1@gated-at.bofh.it> <tAYmJ-5JM-1@gated-at.bofh.it> <tAZiN-6s4-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

On Thu, Apr 27, 2017 at 2:35 PM, Cong Wang <xiyou.wangcong@gmail.com> wrote:
> On Thu, Apr 27, 2017 at 1:31 PM, Cong Wang <xiyou.wangcong@gmail.com> wrote:
>> On Wed, Apr 26, 2017 at 2:20 PM, Paul Moore <paul@paul-moore.com> wrote:
>>> Thanks for the report, this is the only one like it that I've seen.
>>> I'm looking at the code in Linus' tree and I'm not seeing anything
>>> obvious ... looking at the trace above it appears that the problem is
>>> when get_net() goes to bump the refcount and the passed net pointer is
>>> NULL; unless I'm missing something, the only way this would happen in
>>> kauditd_thread() is if the auditd_conn.pid value is non-zero but the
>>> auditd_conn.net pointer is NULL.
>>>
>>> That shouldn't happen.
>>>
>>
>> Looking at the code that reads/writes the global auditd_conn,
>> I don't see how it even works with RCU+spinlock, RCU plays
>> with pointers and you have to make a copy as its name implies.
>> But it looks like you simply use RCU+spinlock as a traditional
>> rwlock, it doesn't work.
>
> The attached patch seems working for me, I tried to boot my
> VM for 4 times, so far no crash or warning.
>

Or even better, save a memory allocation for reset path...

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Boot regression caused by kauditd Cong Wang <xiyou.wangcong@gmail.com> - 2017-04-26 22:50 +0200
  Re: Boot regression caused by kauditd Paul Moore <paul@paul-moore.com> - 2017-04-26 23:30 +0200
    Re: Boot regression caused by kauditd Cong Wang <xiyou.wangcong@gmail.com> - 2017-04-27 07:10 +0200
    Re: Boot regression caused by kauditd Cong Wang <xiyou.wangcong@gmail.com> - 2017-04-27 22:40 +0200
      Re: Boot regression caused by kauditd Cong Wang <xiyou.wangcong@gmail.com> - 2017-04-27 23:40 +0200
        Re: Boot regression caused by kauditd Cong Wang <xiyou.wangcong@gmail.com> - 2017-04-27 23:50 +0200
          Re: Boot regression caused by kauditd Paul Moore <paul@paul-moore.com> - 2017-04-28 00:40 +0200
            Re: Boot regression caused by kauditd Cong Wang <xiyou.wangcong@gmail.com> - 2017-04-28 01:50 +0200
              Re: Boot regression caused by kauditd Paul Moore <paul@paul-moore.com> - 2017-04-28 02:50 +0200
                Re: Boot regression caused by kauditd Paul Moore <paul@paul-moore.com> - 2017-04-28 17:40 +0200
                Re: Boot regression caused by kauditd Cong Wang <xiyou.wangcong@gmail.com> - 2017-04-28 18:20 +0200
                Re: Boot regression caused by kauditd Paul Moore <paul@paul-moore.com> - 2017-04-28 18:30 +0200
                Re: Boot regression caused by kauditd Cong Wang <xiyou.wangcong@gmail.com> - 2017-05-02 08:00 +0200

csiph-web