Skip to content

nullb: free zones when device is power-off - #1137

Open
blktests-ci-kpd[bot] wants to merge 1 commit into
linus-master_basefrom
series/1145940=>linus-master
Open

nullb: free zones when device is power-off#1137
blktests-ci-kpd[bot] wants to merge 1 commit into
linus-master_basefrom
series/1145940=>linus-master

Conversation

@blktests-ci-kpd

Copy link
Copy Markdown

Pull request for series with
subject: nullb: free zones when device is power-off
version: 1
url: https://patchwork.kernel.org/project/linux-block/list/?series=1145940

@blktests-ci-kpd

Copy link
Copy Markdown
Author

Upstream branch: 3aa1dca
series: https://patchwork.kernel.org/project/linux-block/list/?series=1145940
version: 1

@blktests-ci-kpd
blktests-ci-kpd Bot force-pushed the linus-master_base branch 2 times, most recently from d89ab11 to fdba928 Compare August 16, 2026 18:34
@blktests-ci-kpd

Copy link
Copy Markdown
Author

Upstream branch: fd923b3
series: https://patchwork.kernel.org/project/linux-block/list/?series=1145940
version: 1

@blktests-ci-kpd
blktests-ci-kpd Bot force-pushed the series/1145940=>linus-master branch from 052a8e4 to eee90c8 Compare August 16, 2026 19:50
@blktests-ci-kpd

Copy link
Copy Markdown
Author

Upstream branch: 8d3ae59
series: https://patchwork.kernel.org/project/linux-block/list/?series=1145940
version: 1

@blktests-ci-kpd
blktests-ci-kpd Bot force-pushed the series/1145940=>linus-master branch from eee90c8 to f651ef8 Compare August 17, 2026 16:37
@blktests-ci-kpd

Copy link
Copy Markdown
Author

Upstream branch: bd5f485
series: https://patchwork.kernel.org/project/linux-block/list/?series=1145940
version: 1

@blktests-ci-kpd
blktests-ci-kpd Bot force-pushed the series/1145940=>linus-master branch from f651ef8 to dadbef1 Compare August 19, 2026 05:45
@blktests-ci-kpd

Copy link
Copy Markdown
Author

Upstream branch: 66498c7
series: https://patchwork.kernel.org/project/linux-block/list/?series=1145940
version: 1

@blktests-ci-kpd
blktests-ci-kpd Bot force-pushed the series/1145940=>linus-master branch from dadbef1 to 81e0aba Compare August 25, 2026 03:51
@blktests-ci-kpd

Copy link
Copy Markdown
Author

Upstream branch: 502d457
series: https://patchwork.kernel.org/project/linux-block/list/?series=1145940
version: 1

@blktests-ci-kpd
blktests-ci-kpd Bot force-pushed the series/1145940=>linus-master branch from 81e0aba to 65be70b Compare August 26, 2026 21:10
@blktests-ci-kpd

Copy link
Copy Markdown
Author

Upstream branch: cf72cbb
series: https://patchwork.kernel.org/project/linux-block/list/?series=1145940
version: 1

@blktests-ci-kpd
blktests-ci-kpd Bot force-pushed the series/1145940=>linus-master branch from 65be70b to 6e0c099 Compare August 29, 2026 07:09
@blktests-ci-kpd

Copy link
Copy Markdown
Author

Upstream branch: cee9395
series: https://patchwork.kernel.org/project/linux-block/list/?series=1145940
version: 1

@blktests-ci-kpd
blktests-ci-kpd Bot force-pushed the series/1145940=>linus-master branch from 6e0c099 to 00fe3ab Compare August 31, 2026 10:55
@blktests-ci-kpd

Copy link
Copy Markdown
Author

Upstream branch: 89a3129
series: https://patchwork.kernel.org/project/linux-block/list/?series=1145940
version: 1

@blktests-ci-kpd
blktests-ci-kpd Bot force-pushed the series/1145940=>linus-master branch from 00fe3ab to c405553 Compare September 2, 2026 09:28
@blktests-ci-kpd

Copy link
Copy Markdown
Author

Upstream branch: bc35965
series: https://patchwork.kernel.org/project/linux-block/list/?series=1145940
version: 1

@blktests-ci-kpd
blktests-ci-kpd Bot force-pushed the series/1145940=>linus-master branch from c405553 to 16422c3 Compare September 4, 2026 06:42
@blktests-ci-kpd

Copy link
Copy Markdown
Author

Upstream branch: df29080
series: https://patchwork.kernel.org/series/1145940/
version: 1

Pull request is NOT updated. Failed to apply https://patchwork.kernel.org/series/1145940/
error message:

Cmd('git') failed due to: exit code(128)
  cmdline: git am --3way
  stdout: 'Patch is empty.
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To record the empty patch as an empty commit, run "git am --allow-empty".
To restore the original branch and stop patching, run "git am --abort".'

conflict:


@blktests-ci-kpd

Copy link
Copy Markdown
Author

Upstream branch: 28924df
series: https://patchwork.kernel.org/series/1145940/
version: 1

@blktests-ci-kpd

Copy link
Copy Markdown
Author

Upstream branch: 893e117
series: https://patchwork.kernel.org/series/1145940/
version: 1

@blktests-ci-kpd
blktests-ci-kpd Bot force-pushed the series/1145940=>linus-master branch from 66d63fa to 19510b0 Compare September 9, 2026 08:27
@blktests-ci-kpd

Copy link
Copy Markdown
Author

Upstream branch: 50d05c7
series: https://patchwork.kernel.org/series/1145940/
version: 1

A user powers off the device by writing 0 to `./config/nullb/nullb1/power`
via the nullb configfs interface, and later powers it on by writing 1
to the same file.

When the power-off command is executed, the zones created by the previous
task are not freed before new zones are created upon powering on again;
this results in the memory leak described in [1].

Add an operation to free zones within nullb_device_power_store().

[1]
BUG: memory leak
unreferenced object 0xffff888126990000 (size 56000):
  backtrace (crc 5c9573f8):
    null_init_zoned_dev+0x108/0x520 drivers/block/null_blk/zoned.c:94
    null_add_dev+0x8a6/0xae0 drivers/block/null_blk/main.c:1993
    nullb_device_power_store+0xf9/0x1f0 drivers/block/null_blk/main.c:501
    flush_write_buffer fs/configfs/file.c:207 [inline]
    configfs_write_iter+0x10d/0x1a0 fs/configfs/file.c:229
    new_sync_write fs/read_write.c:595 [inline]
    vfs_write+0x3ac/0x720 fs/read_write.c:687

Fixes: cedcafa ("nullb: add interface to power on disk")
Reported-by: syzbot+f57d67a92532a98a562d@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=f57d67a92532a98a562d
Tested-by: syzbot+f57d67a92532a98a562d@syzkaller.appspotmail.com
Signed-off-by: Edward Adam Davis <eadavis@qq.com>
@blktests-ci-kpd
blktests-ci-kpd Bot force-pushed the series/1145940=>linus-master branch from 19510b0 to 4f33cb2 Compare September 10, 2026 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant