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


Groups > linux.kernel > #1674820

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

From Arnd Bergmann <arnd@arndb.de>
Newsgroups linux.kernel
Subject Re: 答复: [RFC PATCH] char: misc: Init misc->list in a safe way
Date 2017-06-26 16:20 +0200
Message-ID <tWD1T-3pT-9@gated-at.bofh.it> (permalink)
References <tWyEW-Ba-21@gated-at.bofh.it> <tWz7Z-10D-47@gated-at.bofh.it> <tWAGK-1PD-5@gated-at.bofh.it> <tWBju-2iS-57@gated-at.bofh.it> <tWD1U-3pT-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon, Jun 26, 2017 at 4:00 PM, Zhongping Tan (谭中平)
<Zhongping.Tan@spreadtrum.com> wrote:
> hi Arnd:
> Another way to describe this question,  misc_register shouldn't modify the member of the miscdevice especially when return error. Let the caller to ensure the list have been initialized,
> or when return error, please don't  initialize the list.

Why not? The caller should only initialize a couple of fields in the
structure (name, minor, fops, ...)
not never even look at the list entry, which is really internal to the
misc_register()/misc_unregister().

       Arnd

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