From: Baoquan He <bhe@redhat.com>
To: hca@linux.ibm.com, kernel test robot <lkp@intel.com>
Cc: linux-kernel@vger.kernel.org, kbuild-all@lists.01.org,
linux-s390@vger.kernel.org, kexec@lists.infradead.org,
prudo@redhat.com
Subject: Re: [PATCH v2 2/2] s390/kexec: fix kmemleak
Date: Thu, 18 Nov 2021 15:13:27 +0800 [thread overview]
Message-ID: <20211118071327.GF21646@MiWiFi-R3L-srv> (raw)
In-Reply-To: <202111180539.e7kmpOSP-lkp@intel.com>
On 11/18/21 at 05:46am, kernel test robot wrote:
> Hi Baoquan,
>
> I love your patch! Yet something to improve:
>
> [auto build test ERROR on s390/features]
> [also build test ERROR on linux/master linus/master v5.16-rc1 next-20211117]
> [cannot apply to kvms390/next]
> [If your patch is applied to the wrong git tree, kindly drop us a note.
> And when submitting patch, we suggest to use '--base' as documented in
> https://git-scm.com/docs/git-format-patch]
>
> url: https://github.com/0day-ci/linux/commits/Baoquan-He/s390-kexec-check-the-return-value-of-ipl_report_finish/20211116-112827
> base: https://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git features
> config: s390-allmodconfig (attached as .config)
> compiler: s390-linux-gcc (GCC) 11.2.0
> reproduce (this is a W=1 build):
> wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
> chmod +x ~/bin/make.cross
> # https://github.com/0day-ci/linux/commit/d5463ab680d37f95b493b71c487a51c039dfe845
> git remote add linux-review https://github.com/0day-ci/linux
> git fetch --no-tags linux-review Baoquan-He/s390-kexec-check-the-return-value-of-ipl_report_finish/20211116-112827
> git checkout d5463ab680d37f95b493b71c487a51c039dfe845
> # save the attached .config to linux build tree
> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=s390
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
>
> All errors (new ones prefixed by >>):
>
> arch/s390/kernel/machine_kexec_file.c: In function 'arch_kimage_file_post_load_cleanup':
> >> arch/s390/kernel/machine_kexec_file.c:332:9: error: implicit declaration of function 'kvfree'; did you mean 'vfree'? [-Werror=implicit-function-declaration]
> 332 | kvfree(image->arch.ipl_buf);
> | ^~~~~~
> | vfree
OK, kvfree is not wrong, seems vfree is more appropriate since it's
clear the ipl_buf is allocated with zvalloc() in ipl_report_finish().
Hi Heiko,
Could you help modify the code in your tree or append below patch to
mute the lkp complaint? Sorry for the inconvenience.
From 8ff5547d0b31093bb361328bc9df8bf19e96155a Mon Sep 17 00:00:00 2001
From: Baoquan He <bhe@redhat.com>
Date: Thu, 18 Nov 2021 14:37:53 +0800
Subject: [PATCH] s390/kexec: use vfree to free memory from vmalloc
Since it's clear that memory is allocated with vzalloc in ipl_report_finish(),
let's use vfree to free the memory instead since it's more efficient than
kvfree.
This fixes the warning reported by lkp.
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Baoquan He <bhe@redhat.com>
---
arch/s390/kernel/machine_kexec_file.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/s390/kernel/machine_kexec_file.c b/arch/s390/kernel/machine_kexec_file.c
index 7f51837e9bc2..351a7ff69a43 100644
--- a/arch/s390/kernel/machine_kexec_file.c
+++ b/arch/s390/kernel/machine_kexec_file.c
@@ -329,7 +329,7 @@ int arch_kexec_apply_relocations_add(struct purgatory_info *pi,
int arch_kimage_file_post_load_cleanup(struct kimage *image)
{
- kvfree(image->arch.ipl_buf);
+ vfree(image->arch.ipl_buf);
image->arch.ipl_buf = NULL;
return kexec_image_post_load_cleanup_default(image);
--
2.17.2
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
WARNING: multiple messages have this Message-ID (diff)
From: Baoquan He <bhe@redhat.com>
To: hca@linux.ibm.com, kernel test robot <lkp@intel.com>
Cc: linux-kernel@vger.kernel.org, kbuild-all@lists.01.org,
linux-s390@vger.kernel.org, kexec@lists.infradead.org,
prudo@redhat.com
Subject: Re: [PATCH v2 2/2] s390/kexec: fix kmemleak
Date: Thu, 18 Nov 2021 15:13:27 +0800 [thread overview]
Message-ID: <20211118071327.GF21646@MiWiFi-R3L-srv> (raw)
In-Reply-To: <202111180539.e7kmpOSP-lkp@intel.com>
On 11/18/21 at 05:46am, kernel test robot wrote:
> Hi Baoquan,
>
> I love your patch! Yet something to improve:
>
> [auto build test ERROR on s390/features]
> [also build test ERROR on linux/master linus/master v5.16-rc1 next-20211117]
> [cannot apply to kvms390/next]
> [If your patch is applied to the wrong git tree, kindly drop us a note.
> And when submitting patch, we suggest to use '--base' as documented in
> https://git-scm.com/docs/git-format-patch]
>
> url: https://github.com/0day-ci/linux/commits/Baoquan-He/s390-kexec-check-the-return-value-of-ipl_report_finish/20211116-112827
> base: https://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git features
> config: s390-allmodconfig (attached as .config)
> compiler: s390-linux-gcc (GCC) 11.2.0
> reproduce (this is a W=1 build):
> wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
> chmod +x ~/bin/make.cross
> # https://github.com/0day-ci/linux/commit/d5463ab680d37f95b493b71c487a51c039dfe845
> git remote add linux-review https://github.com/0day-ci/linux
> git fetch --no-tags linux-review Baoquan-He/s390-kexec-check-the-return-value-of-ipl_report_finish/20211116-112827
> git checkout d5463ab680d37f95b493b71c487a51c039dfe845
> # save the attached .config to linux build tree
> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=s390
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
>
> All errors (new ones prefixed by >>):
>
> arch/s390/kernel/machine_kexec_file.c: In function 'arch_kimage_file_post_load_cleanup':
> >> arch/s390/kernel/machine_kexec_file.c:332:9: error: implicit declaration of function 'kvfree'; did you mean 'vfree'? [-Werror=implicit-function-declaration]
> 332 | kvfree(image->arch.ipl_buf);
> | ^~~~~~
> | vfree
OK, kvfree is not wrong, seems vfree is more appropriate since it's
clear the ipl_buf is allocated with zvalloc() in ipl_report_finish().
Hi Heiko,
Could you help modify the code in your tree or append below patch to
mute the lkp complaint? Sorry for the inconvenience.
From 8ff5547d0b31093bb361328bc9df8bf19e96155a Mon Sep 17 00:00:00 2001
From: Baoquan He <bhe@redhat.com>
Date: Thu, 18 Nov 2021 14:37:53 +0800
Subject: [PATCH] s390/kexec: use vfree to free memory from vmalloc
Since it's clear that memory is allocated with vzalloc in ipl_report_finish(),
let's use vfree to free the memory instead since it's more efficient than
kvfree.
This fixes the warning reported by lkp.
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Baoquan He <bhe@redhat.com>
---
arch/s390/kernel/machine_kexec_file.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/s390/kernel/machine_kexec_file.c b/arch/s390/kernel/machine_kexec_file.c
index 7f51837e9bc2..351a7ff69a43 100644
--- a/arch/s390/kernel/machine_kexec_file.c
+++ b/arch/s390/kernel/machine_kexec_file.c
@@ -329,7 +329,7 @@ int arch_kexec_apply_relocations_add(struct purgatory_info *pi,
int arch_kimage_file_post_load_cleanup(struct kimage *image)
{
- kvfree(image->arch.ipl_buf);
+ vfree(image->arch.ipl_buf);
image->arch.ipl_buf = NULL;
return kexec_image_post_load_cleanup_default(image);
--
2.17.2
WARNING: multiple messages have this Message-ID (diff)
From: Baoquan He <bhe@redhat.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH v2 2/2] s390/kexec: fix kmemleak
Date: Thu, 18 Nov 2021 15:13:27 +0800 [thread overview]
Message-ID: <20211118071327.GF21646@MiWiFi-R3L-srv> (raw)
In-Reply-To: <202111180539.e7kmpOSP-lkp@intel.com>
[-- Attachment #1: Type: text/plain, Size: 3454 bytes --]
On 11/18/21 at 05:46am, kernel test robot wrote:
> Hi Baoquan,
>
> I love your patch! Yet something to improve:
>
> [auto build test ERROR on s390/features]
> [also build test ERROR on linux/master linus/master v5.16-rc1 next-20211117]
> [cannot apply to kvms390/next]
> [If your patch is applied to the wrong git tree, kindly drop us a note.
> And when submitting patch, we suggest to use '--base' as documented in
> https://git-scm.com/docs/git-format-patch]
>
> url: https://github.com/0day-ci/linux/commits/Baoquan-He/s390-kexec-check-the-return-value-of-ipl_report_finish/20211116-112827
> base: https://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git features
> config: s390-allmodconfig (attached as .config)
> compiler: s390-linux-gcc (GCC) 11.2.0
> reproduce (this is a W=1 build):
> wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
> chmod +x ~/bin/make.cross
> # https://github.com/0day-ci/linux/commit/d5463ab680d37f95b493b71c487a51c039dfe845
> git remote add linux-review https://github.com/0day-ci/linux
> git fetch --no-tags linux-review Baoquan-He/s390-kexec-check-the-return-value-of-ipl_report_finish/20211116-112827
> git checkout d5463ab680d37f95b493b71c487a51c039dfe845
> # save the attached .config to linux build tree
> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=s390
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
>
> All errors (new ones prefixed by >>):
>
> arch/s390/kernel/machine_kexec_file.c: In function 'arch_kimage_file_post_load_cleanup':
> >> arch/s390/kernel/machine_kexec_file.c:332:9: error: implicit declaration of function 'kvfree'; did you mean 'vfree'? [-Werror=implicit-function-declaration]
> 332 | kvfree(image->arch.ipl_buf);
> | ^~~~~~
> | vfree
OK, kvfree is not wrong, seems vfree is more appropriate since it's
clear the ipl_buf is allocated with zvalloc() in ipl_report_finish().
Hi Heiko,
Could you help modify the code in your tree or append below patch to
mute the lkp complaint? Sorry for the inconvenience.
>From 8ff5547d0b31093bb361328bc9df8bf19e96155a Mon Sep 17 00:00:00 2001
From: Baoquan He <bhe@redhat.com>
Date: Thu, 18 Nov 2021 14:37:53 +0800
Subject: [PATCH] s390/kexec: use vfree to free memory from vmalloc
Since it's clear that memory is allocated with vzalloc in ipl_report_finish(),
let's use vfree to free the memory instead since it's more efficient than
kvfree.
This fixes the warning reported by lkp.
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Baoquan He <bhe@redhat.com>
---
arch/s390/kernel/machine_kexec_file.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/s390/kernel/machine_kexec_file.c b/arch/s390/kernel/machine_kexec_file.c
index 7f51837e9bc2..351a7ff69a43 100644
--- a/arch/s390/kernel/machine_kexec_file.c
+++ b/arch/s390/kernel/machine_kexec_file.c
@@ -329,7 +329,7 @@ int arch_kexec_apply_relocations_add(struct purgatory_info *pi,
int arch_kimage_file_post_load_cleanup(struct kimage *image)
{
- kvfree(image->arch.ipl_buf);
+ vfree(image->arch.ipl_buf);
image->arch.ipl_buf = NULL;
return kexec_image_post_load_cleanup_default(image);
--
2.17.2
next prev parent reply other threads:[~2021-11-18 7:13 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-16 3:25 [PATCH v2 1/2] s390/kexec: check the return value of ipl_report_finish Baoquan He
2021-11-16 3:25 ` Baoquan He
2021-11-16 3:25 ` [PATCH v2 2/2] s390/kexec: fix kmemleak Baoquan He
2021-11-16 3:25 ` Baoquan He
2021-11-16 3:31 ` [PATCH v2 RESEND 2/2] s390/kexec: fix memory leak of ipl report buffer Baoquan He
2021-11-16 3:31 ` Baoquan He
2021-11-16 11:17 ` Heiko Carstens
2021-11-16 11:17 ` Heiko Carstens
2021-11-17 21:46 ` [PATCH v2 2/2] s390/kexec: fix kmemleak kernel test robot
2021-11-17 21:46 ` kernel test robot
2021-11-18 7:13 ` Baoquan He [this message]
2021-11-18 7:13 ` Baoquan He
2021-11-18 7:13 ` Baoquan He
2021-11-18 8:53 ` Heiko Carstens
2021-11-18 8:53 ` Heiko Carstens
2021-11-18 8:53 ` Heiko Carstens
2021-11-19 2:35 ` Baoquan He
2021-11-19 2:35 ` Baoquan He
2021-11-19 2:35 ` Baoquan He
2021-11-16 11:17 ` [PATCH v2 1/2] s390/kexec: check the return value of ipl_report_finish Heiko Carstens
2021-11-16 11:17 ` Heiko Carstens
2021-11-16 13:39 ` Baoquan He
2021-11-16 13:39 ` Baoquan He
2021-11-26 8:21 ` kernel test robot
2021-11-26 8:21 ` kernel test robot
2021-11-26 8:21 ` kernel test robot
2021-11-26 9:36 ` Baoquan He
2021-11-26 9:36 ` Baoquan He
2021-11-26 9:36 ` Baoquan He
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=20211118071327.GF21646@MiWiFi-R3L-srv \
--to=bhe@redhat.com \
--cc=hca@linux.ibm.com \
--cc=kbuild-all@lists.01.org \
--cc=kexec@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=lkp@intel.com \
--cc=prudo@redhat.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 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.