From: Dan Carpenter <dan.carpenter@oracle.com>
To: lustre-devel@lists.lustre.org
Subject: [lustre-devel] staging: add Lustre file system client support
Date: Wed, 27 Apr 2016 15:28:47 +0300 [thread overview]
Message-ID: <20160427122846.GA6441@mwanda> (raw)
Hello Lustre devs,
The patch d7e09d0397e8: "staging: add Lustre file system client
support" from May 2, 2013, leads to the following Parfait warning.
Parfait is an Oracle static analysis tool. If there is a patch from
this could you give credit to Lidza Louina <lidza.louina@oracle.com>?
drivers/staging/lustre/lustre/ldlm/interval_tree.c
399 void interval_erase(struct interval_node *node,
400 struct interval_node **root)
401 {
402 struct interval_node *child, *parent;
403 int color;
404
405 LASSERT(interval_is_intree(node));
406 node->in_intree = 0;
407 if (!node->in_left) {
408 child = node->in_right;
409 } else if (!node->in_right) {
410 child = node->in_left;
411 } else { /* Both left and right child are not NULL */
412 struct interval_node *old = node;
413
414 node = interval_next(node);
^^^^^^^^^^^^^^^^^^^^^^^^^^
It looks like interval_next() can return NULL.
415 child = node->in_right;
416 parent = node->in_parent;
417 color = node->in_color;
418
Here is the interval_next() function:
drivers/staging/lustre/lustre/ldlm/interval_tree.c
111 static struct interval_node *interval_next(struct interval_node *node)
112 {
113 if (!node)
114 return NULL;
115 if (node->in_right)
116 return interval_first(node->in_right);
117 while (node->in_parent && node_is_right_child(node))
^^^^^^^^^^^^^^^
We assume that ->in_parent can be NULL here. Is that actually possible?
118 node = node->in_parent;
119 return node->in_parent;
120 }
regards,
dan carpenter
next reply other threads:[~2016-04-27 12:28 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-27 12:28 Dan Carpenter [this message]
2016-05-11 23:53 ` [lustre-devel] staging: add Lustre file system client support James Simmons
2016-05-13 16:18 ` Drokin, Oleg
-- strict thread matches above, loose matches on Subject: below --
2016-03-17 20:09 Dan Carpenter
2015-10-15 11:14 Dan Carpenter
2015-10-15 11:38 ` Dan Carpenter
2015-10-15 11:43 ` Dan Carpenter
2015-10-15 10:59 Dan Carpenter
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=20160427122846.GA6441@mwanda \
--to=dan.carpenter@oracle.com \
--cc=lustre-devel@lists.lustre.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.