From: Himadri Pandya <himadri18.07@gmail.com>
To: benh@kernel.crashing.org, paulus@samba.org, mpe@ellerman.id.au,
tyreld@linux.vnet.ibm.com
Cc: linuxppc-dev@lists.ozlabs.org, Himadri Pandya <himadri18.07@gmail.com>
Subject: [PATCH v3 1/2] arch: powerpc/kexec: Add missing of_node-put() in default_machine_kexec_prepare()
Date: Wed, 27 Feb 2019 15:21:37 +0530 [thread overview]
Message-ID: <20190227095138.30263-1-himadri18.07@gmail.com> (raw)
In-Reply-To: <20190225090056.19055-1-himadri18.07@gmail.com>
Decrement the reference count on device_node "node" while breaking out
of the loop. Issue identified by Coccinelle.
Signed-off-by: Himadri Pandya <himadri18.07@gmail.com>
---
Changes in V2:
- Change subject line
---
Changes in V3:
- Add braces around the if block
---
arch/powerpc/kernel/machine_kexec_64.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/kernel/machine_kexec_64.c b/arch/powerpc/kernel/machine_kexec_64.c
index a0f6f45005bd..ef484a25fc50 100644
--- a/arch/powerpc/kernel/machine_kexec_64.c
+++ b/arch/powerpc/kernel/machine_kexec_64.c
@@ -64,8 +64,10 @@ int default_machine_kexec_prepare(struct kimage *image)
begin = image->segment[i].mem;
end = begin + image->segment[i].memsz;
- if ((begin < high) && (end > low))
+ if ((begin < high) && (end > low)) {
+ of_node_put(node);
return -ETXTBSY;
+ }
}
}
--
2.17.1
next prev parent reply other threads:[~2019-02-27 9:54 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20190224080209.15969-1-himadri18.07@gmail.com>
2019-02-25 9:00 ` [PATCH v2 1/2] arch: powerpc/kexec: Add missing of_node-put() in default_machine_kexec_prepare() Himadri Pandya
2019-02-25 9:00 ` [PATCH v2 2/2] arch: powerpc/hlwd-pic: Add missing of_node-put() in hlwd_pic_probe() Himadri Pandya
2019-02-25 23:21 ` Tyrel Datwyler
2019-02-25 16:09 ` [PATCH v2 1/2] arch: powerpc/kexec: Add missing of_node-put() in default_machine_kexec_prepare() kbuild test robot
2019-02-25 23:20 ` Tyrel Datwyler
2019-02-27 9:51 ` Himadri Pandya [this message]
2019-02-27 9:51 ` [PATCH v3 2/2] arch: powerpc/hlwd-pic: Add missing of_node-put() in hlwd_pic_probe() Himadri Pandya
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=20190227095138.30263-1-himadri18.07@gmail.com \
--to=himadri18.07@gmail.com \
--cc=benh@kernel.crashing.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=paulus@samba.org \
--cc=tyreld@linux.vnet.ibm.com \
/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).