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


Groups > linux.kernel > #1676375

Re: [RFC PATCH] char: misc: Init misc->list in a safe way

From Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Newsgroups linux.kernel
Subject Re: [RFC PATCH] char: misc: Init misc->list in a safe way
Date 2017-06-28 07:20 +0200
Message-ID <tXdyp-2CK-5@gated-at.bofh.it> (permalink)
References (4 earlier) <tWD1U-3pT-11@gated-at.bofh.it> <tWD1T-3pT-9@gated-at.bofh.it> <tWO6Z-2cR-9@gated-at.bofh.it> <tWSaB-4ZW-7@gated-at.bofh.it> <tXaqR-ld-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed, Jun 28, 2017 at 09:54:32AM +0800, Orson Zhai wrote:
> We found the device is "fm". We highly suspect that fm driver call
> misc_register twice and reinitialize list to make ->pre & ->next
> pointing to himself.
> 
> Meanwhile, we checked fm driver and found nothing obviously wrong in the code.

Do you have a pointer to this driver?  Is it in the kernel tree?

> Consider that this is a crash after 46 hours continuous power-on/off,
> it maybe caused by some special cases we are hard to know for now.

What would cause this driver to want to register/unregister itself?  Is
it "recycling" the misc structure, or creating it new each time?

And what kernel version are you testing here?

> We think it might make some sence to add protection code into
> misc_register() at first.

To protect from "foolish" callers?  Usually we fix the calling code to
not do foolish things. :)

thanks,

greg k-h

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


Thread

[RFC PATCH] char: misc: Init misc->list in a safe way Orson Zhai <orson.zhai@spreadtrum.com> - 2017-06-26 11:40 +0200
  Re: [RFC PATCH] char: misc: Init misc->list in a safe way Arnd Bergmann <arnd@arndb.de> - 2017-06-26 12:10 +0200
    RE: [RFC PATCH] char: misc: Init misc->list in a safe way Zhongping Tan (谭中平)          <Zhongping.Tan@spreadtrum.com> - 2017-06-26 13:50 +0200
      Re: [RFC PATCH] char: misc: Init misc->list in a safe way Arnd Bergmann <arnd@arndb.de> - 2017-06-26 14:30 +0200
        Re: 答复: [RFC PATCH] char: misc: Init misc->list in a safe way Arnd Bergmann <arnd@arndb.de> - 2017-06-26 16:20 +0200
          RE: 答复: [RFC PATCH] char: misc: Init misc->list in a safe way Zhongping Tan (谭中平)          <Zhongping.Tan@spreadtrum.com> - 2017-06-27 04:10 +0200
            Re: 答复: [RFC PATCH] char: misc:  Init misc->list in a safe way Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-06-27 08:30 +0200
              Re: [RFC PATCH] char: misc: Init misc->list in a safe way Orson Zhai <orson.zhai@spreadtrum.com> - 2017-06-28 04:00 +0200
                Re: [RFC PATCH] char: misc: Init misc->list in a safe way Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-06-28 07:20 +0200
                Re: [RFC PATCH] char: misc: Init misc->list in a safe way Arnd Bergmann <arnd@arndb.de> - 2017-06-28 12:40 +0200
                Re: [RFC PATCH] char: misc: Init misc->list in a safe way Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-06-28 13:30 +0200
                Re: [RFC PATCH] char: misc: Init misc->list in a safe way Chunyan Zhang <zhang.lyra@gmail.com> - 2017-06-29 09:00 +0200
                Re: [RFC PATCH] char: misc: Init misc->list in a safe way Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-06-29 09:10 +0200
                Re: [RFC PATCH] char: misc: Init misc->list in a safe way Chunyan Zhang <zhang.lyra@gmail.com> - 2017-06-29 09:40 +0200

csiph-web