kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: kernel-janitors@vger.kernel.org
Subject: Re: question about lists
Date: Tue, 05 May 2020 08:35:05 +0000	[thread overview]
Message-ID: <20200505083505.GY2014@kadam> (raw)
In-Reply-To: <alpine.DEB.2.21.2005032308500.2533@hadrien>

On Mon, May 04, 2020 at 09:41:21PM +0200, Christophe JAILLET wrote:
>    - in your example, before commit f52c380a48f52, it was allocated with
> kmalloc, so it was maybe to avoid a really unlikely '__list_add_valid'
> failure. Now that it is kzalloc'ed, this can not happen anymore.

No, it was never possible to get a __list_add_valid() failure.  The list
you're adding to has to be initialized, but the list item that doesn't.
In __list_add_valid() the "new" is "&entry_obj->list" which is an offset
into the entry_obj object.

regards,
dan carpenter

      parent reply	other threads:[~2020-05-05  8:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-03 21:10 question about lists Julia Lawall
2020-05-04 19:23 ` Dan Carpenter
2020-05-04 19:28 ` Julia Lawall
2020-05-04 19:41 ` Christophe JAILLET
2020-05-05  8:35 ` Dan Carpenter [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200505083505.GY2014@kadam \
    --to=dan.carpenter@oracle.com \
    --cc=kernel-janitors@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).