* [LTP] [PATCH] tbio/ltp_tbio.c: Change the order of calling blk_cleanup_queue() and del_gendisk()
@ 2018-10-22 7:29 Xiao Yang
2018-10-23 2:29 ` Xiao Yang
2018-12-21 8:11 ` Xiao Yang
0 siblings, 2 replies; 4+ messages in thread
From: Xiao Yang @ 2018-10-22 7:29 UTC (permalink / raw)
To: ltp
Removing ltp_tbio.ko module always reproduced a warning and panic
on the old kernels that have backported kernel commit a063057d7c73
(e.g. RHEL7.6).
Removing ltp_tbio.ko module calls blk_cleanup_queue() and del_gendisk()
in the order so that it triggers races or warnings since commit a063057d7c73
in kernel, and some kernel modules have fixed the issue, as below:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=57678e5a3d5145e5f08aa1d307ba219b27b1765a
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=0fa8ebdd4244b8e652cc5341c3d5b4b06f84a637
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d8115c35bf3ee575cfc9c51ac9853f58a21a43dc
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=392db38058eb47250a9d0cc737af37e78a7e443d
We also try to fix the issue in the same way.
Note:
A lot of structs and functions in ltp_tbio.ko module based on old
kernel(e.g. 3.10.0) has been changed on upstream kernel, so ltp_tbio.ko
module cannot be built on upstream kernel. Perhaps ltp_tbio.ko
module needs to be updated, but we want to fix the issue first.
Signed-off-by: Xiao Yang <yangx.jy@cn.fujitsu.com>
---
testcases/kernel/device-drivers/tbio/tbio_kernel/ltp_tbio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/testcases/kernel/device-drivers/tbio/tbio_kernel/ltp_tbio.c b/testcases/kernel/device-drivers/tbio/tbio_kernel/ltp_tbio.c
index 48cc588..0a9cd40 100644
--- a/testcases/kernel/device-drivers/tbio/tbio_kernel/ltp_tbio.c
+++ b/testcases/kernel/device-drivers/tbio/tbio_kernel/ltp_tbio.c
@@ -562,8 +562,8 @@ module_init(tbio_init);
static void tbio_exit(void)
{
- blk_cleanup_queue(tbio_dev.q);
del_gendisk(tbio_dev.gd);
+ blk_cleanup_queue(tbio_dev.q);
put_disk(tbio_dev.gd);
unregister_blkdev(TBIO_MAJOR, DEVICE_NAME);
vfree(tbio_dev.data);
--
1.8.3.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [LTP] [PATCH] tbio/ltp_tbio.c: Change the order of calling blk_cleanup_queue() and del_gendisk()
2018-10-22 7:29 [LTP] [PATCH] tbio/ltp_tbio.c: Change the order of calling blk_cleanup_queue() and del_gendisk() Xiao Yang
@ 2018-10-23 2:29 ` Xiao Yang
2019-01-03 11:06 ` Jan Stancek
2018-12-21 8:11 ` Xiao Yang
1 sibling, 1 reply; 4+ messages in thread
From: Xiao Yang @ 2018-10-23 2:29 UTC (permalink / raw)
To: ltp
On 2018/10/22 15:29, Xiao Yang wrote:
> Removing ltp_tbio.ko module always reproduced a warning and panic
> on the old kernels that have backported kernel commit a063057d7c73
> (e.g. RHEL7.6).
Hi,
Sorry, the RHEL version is sensltive, so please remove it when pushing
the patch.
Best Regards,
Xiao Yang
> Removing ltp_tbio.ko module calls blk_cleanup_queue() and del_gendisk()
> in the order so that it triggers races or warnings since commit a063057d7c73
> in kernel, and some kernel modules have fixed the issue, as below:
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=57678e5a3d5145e5f08aa1d307ba219b27b1765a
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=0fa8ebdd4244b8e652cc5341c3d5b4b06f84a637
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d8115c35bf3ee575cfc9c51ac9853f58a21a43dc
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=392db38058eb47250a9d0cc737af37e78a7e443d
>
> We also try to fix the issue in the same way.
>
> Note:
> A lot of structs and functions in ltp_tbio.ko module based on old
> kernel(e.g. 3.10.0) has been changed on upstream kernel, so ltp_tbio.ko
> module cannot be built on upstream kernel. Perhaps ltp_tbio.ko
> module needs to be updated, but we want to fix the issue first.
>
> Signed-off-by: Xiao Yang <yangx.jy@cn.fujitsu.com>
> ---
> testcases/kernel/device-drivers/tbio/tbio_kernel/ltp_tbio.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/testcases/kernel/device-drivers/tbio/tbio_kernel/ltp_tbio.c b/testcases/kernel/device-drivers/tbio/tbio_kernel/ltp_tbio.c
> index 48cc588..0a9cd40 100644
> --- a/testcases/kernel/device-drivers/tbio/tbio_kernel/ltp_tbio.c
> +++ b/testcases/kernel/device-drivers/tbio/tbio_kernel/ltp_tbio.c
> @@ -562,8 +562,8 @@ module_init(tbio_init);
>
> static void tbio_exit(void)
> {
> - blk_cleanup_queue(tbio_dev.q);
> del_gendisk(tbio_dev.gd);
> + blk_cleanup_queue(tbio_dev.q);
> put_disk(tbio_dev.gd);
> unregister_blkdev(TBIO_MAJOR, DEVICE_NAME);
> vfree(tbio_dev.data);
^ permalink raw reply [flat|nested] 4+ messages in thread
* [LTP] [PATCH] tbio/ltp_tbio.c: Change the order of calling blk_cleanup_queue() and del_gendisk()
2018-10-22 7:29 [LTP] [PATCH] tbio/ltp_tbio.c: Change the order of calling blk_cleanup_queue() and del_gendisk() Xiao Yang
2018-10-23 2:29 ` Xiao Yang
@ 2018-12-21 8:11 ` Xiao Yang
1 sibling, 0 replies; 4+ messages in thread
From: Xiao Yang @ 2018-12-21 8:11 UTC (permalink / raw)
To: ltp
Hi,
Ping :-)
Best Regards,
Xiao Yang
On 2018/10/22 15:29, Xiao Yang wrote:
> Removing ltp_tbio.ko module always reproduced a warning and panic
> on the old kernels that have backported kernel commit a063057d7c73
> (e.g. RHEL7.6).
>
> Removing ltp_tbio.ko module calls blk_cleanup_queue() and del_gendisk()
> in the order so that it triggers races or warnings since commit a063057d7c73
> in kernel, and some kernel modules have fixed the issue, as below:
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=57678e5a3d5145e5f08aa1d307ba219b27b1765a
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=0fa8ebdd4244b8e652cc5341c3d5b4b06f84a637
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d8115c35bf3ee575cfc9c51ac9853f58a21a43dc
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=392db38058eb47250a9d0cc737af37e78a7e443d
>
> We also try to fix the issue in the same way.
>
> Note:
> A lot of structs and functions in ltp_tbio.ko module based on old
> kernel(e.g. 3.10.0) has been changed on upstream kernel, so ltp_tbio.ko
> module cannot be built on upstream kernel. Perhaps ltp_tbio.ko
> module needs to be updated, but we want to fix the issue first.
>
> Signed-off-by: Xiao Yang <yangx.jy@cn.fujitsu.com>
> ---
> testcases/kernel/device-drivers/tbio/tbio_kernel/ltp_tbio.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/testcases/kernel/device-drivers/tbio/tbio_kernel/ltp_tbio.c b/testcases/kernel/device-drivers/tbio/tbio_kernel/ltp_tbio.c
> index 48cc588..0a9cd40 100644
> --- a/testcases/kernel/device-drivers/tbio/tbio_kernel/ltp_tbio.c
> +++ b/testcases/kernel/device-drivers/tbio/tbio_kernel/ltp_tbio.c
> @@ -562,8 +562,8 @@ module_init(tbio_init);
>
> static void tbio_exit(void)
> {
> - blk_cleanup_queue(tbio_dev.q);
> del_gendisk(tbio_dev.gd);
> + blk_cleanup_queue(tbio_dev.q);
> put_disk(tbio_dev.gd);
> unregister_blkdev(TBIO_MAJOR, DEVICE_NAME);
> vfree(tbio_dev.data);
^ permalink raw reply [flat|nested] 4+ messages in thread
* [LTP] [PATCH] tbio/ltp_tbio.c: Change the order of calling blk_cleanup_queue() and del_gendisk()
2018-10-23 2:29 ` Xiao Yang
@ 2019-01-03 11:06 ` Jan Stancek
0 siblings, 0 replies; 4+ messages in thread
From: Jan Stancek @ 2019-01-03 11:06 UTC (permalink / raw)
To: ltp
----- Original Message -----
> On 2018/10/22 15:29, Xiao Yang wrote:
> > Removing ltp_tbio.ko module always reproduced a warning and panic
> > on the old kernels that have backported kernel commit a063057d7c73
> > (e.g. RHEL7.6).
> Hi,
>
> Sorry, the RHEL version is sensltive, so please remove it when pushing
> the patch.
Not sure what you mean by 'sensitive'. Anyway, pushed with
the note about RHEL7.6 dropped.
Regards,
Jan
>
> Best Regards,
> Xiao Yang
> > Removing ltp_tbio.ko module calls blk_cleanup_queue() and del_gendisk()
> > in the order so that it triggers races or warnings since commit
> > a063057d7c73
> > in kernel, and some kernel modules have fixed the issue, as below:
> > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=57678e5a3d5145e5f08aa1d307ba219b27b1765a
> > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=0fa8ebdd4244b8e652cc5341c3d5b4b06f84a637
> > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d8115c35bf3ee575cfc9c51ac9853f58a21a43dc
> > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=392db38058eb47250a9d0cc737af37e78a7e443d
> >
> > We also try to fix the issue in the same way.
> >
> > Note:
> > A lot of structs and functions in ltp_tbio.ko module based on old
> > kernel(e.g. 3.10.0) has been changed on upstream kernel, so ltp_tbio.ko
> > module cannot be built on upstream kernel. Perhaps ltp_tbio.ko
> > module needs to be updated, but we want to fix the issue first.
> >
> > Signed-off-by: Xiao Yang <yangx.jy@cn.fujitsu.com>
> > ---
> > testcases/kernel/device-drivers/tbio/tbio_kernel/ltp_tbio.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/testcases/kernel/device-drivers/tbio/tbio_kernel/ltp_tbio.c
> > b/testcases/kernel/device-drivers/tbio/tbio_kernel/ltp_tbio.c
> > index 48cc588..0a9cd40 100644
> > --- a/testcases/kernel/device-drivers/tbio/tbio_kernel/ltp_tbio.c
> > +++ b/testcases/kernel/device-drivers/tbio/tbio_kernel/ltp_tbio.c
> > @@ -562,8 +562,8 @@ module_init(tbio_init);
> >
> > static void tbio_exit(void)
> > {
> > - blk_cleanup_queue(tbio_dev.q);
> > del_gendisk(tbio_dev.gd);
> > + blk_cleanup_queue(tbio_dev.q);
> > put_disk(tbio_dev.gd);
> > unregister_blkdev(TBIO_MAJOR, DEVICE_NAME);
> > vfree(tbio_dev.data);
>
>
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-01-03 11:06 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-22 7:29 [LTP] [PATCH] tbio/ltp_tbio.c: Change the order of calling blk_cleanup_queue() and del_gendisk() Xiao Yang
2018-10-23 2:29 ` Xiao Yang
2019-01-03 11:06 ` Jan Stancek
2018-12-21 8:11 ` Xiao Yang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox