Re: [PATCH v2 00/15] sysctl: Remove sentinel elements from drivers

2023-10-10 Thread Luis Chamberlain
On Mon, Oct 02, 2023 at 10:55:17AM +0200, Joel Granados via B4 Relay wrote: > Changes in v2: > - Left the dangling comma in the ctl_table arrays. > - Link to v1: > https://lore.kernel.org/r/20230928-jag-sysctl_remove_empty_elem_drivers-v1-0-e59120fca...@samsung.com Thanks! Pushed onto

Re: [PATCH 0/7] sysctl: slowly deprecate register_sysctl_table()

2023-03-09 Thread Luis Chamberlain
On Thu, Mar 02, 2023 at 12:46:05PM -0800, Luis Chamberlain wrote: > I'm happy to take these via sysctl-next [0] but since > I don' think register_sysctl_table() will be nuked on v6.4 I think > it's fine for each of these to go into each respective tree. I can > pick up last straggle

[PATCH 3/7] hv: simplify sysctl registration

2023-03-02 Thread Luis Chamberlain
register_sysctl_table() is a deprecated compatibility wrapper. register_sysctl() can do the directory creation for you so just use that. Signed-off-by: Luis Chamberlain --- drivers/hv/vmbus_drv.c | 11 +-- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/drivers/hv

[PATCH 0/7] sysctl: slowly deprecate register_sysctl_table()

2023-03-02 Thread Luis Chamberlain
know and I'm happy to do that. Either way works. [0] https://lkml.kernel.org/r/20230302202826.776286-1-mcg...@kernel.org Luis Chamberlain (7): scsi: simplify sysctl registration with register_sysctl() ipmi: simplify sysctl registration hv: simplify sysctl registration md: simplify sysctl

[PATCH 6/7] tty: simplify sysctl registration

2023-03-02 Thread Luis Chamberlain
register_sysctl_table() is a deprecated compatibility wrapper. register_sysctl_init() can do the directory creation for you so just use that Signed-off-by: Luis Chamberlain --- drivers/tty/tty_io.c | 20 +--- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/drivers

[PATCH 7/7] xen: simplify sysctl registration for balloon

2023-03-02 Thread Luis Chamberlain
register_sysctl_table() is a deprecated compatibility wrapper. register_sysctl_init() can do the directory creation for you so just use that. Signed-off-by: Luis Chamberlain --- drivers/xen/balloon.c | 20 +--- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git

[PATCH 1/7] scsi: simplify sysctl registration with register_sysctl()

2023-03-02 Thread Luis Chamberlain
register_sysctl_table() is a deprecated compatibility wrapper. register_sysctl() can do the directory creation for you so just use that. Signed-off-by: Luis Chamberlain --- drivers/scsi/scsi_sysctl.c | 16 +--- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/drivers

[PATCH 2/7] ipmi: simplify sysctl registration

2023-03-02 Thread Luis Chamberlain
register_sysctl_table() is a deprecated compatibility wrapper. register_sysctl() can do the directory creation for you so just use that. Signed-off-by: Luis Chamberlain --- drivers/char/ipmi/ipmi_poweroff.c | 16 +--- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git

[PATCH 4/7] md: simplify sysctl registration

2023-03-02 Thread Luis Chamberlain
register_sysctl_table() is a deprecated compatibility wrapper. register_sysctl() can do the directory creation for you so just use that. Signed-off-by: Luis Chamberlain --- drivers/md/md.c | 22 +- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/drivers/md/md.c

[PATCH 5/7] sgi-xp: simplify sysctl registration

2023-03-02 Thread Luis Chamberlain
. register_sysctl_table() is a deprecated compatibility wrapper. register_sysctl() can do the directory creation for you so just use that. Signed-off-by: Luis Chamberlain --- drivers/misc/sgi-xp/xpc_main.c | 24 ++-- 1 file changed, 10 insertions(+), 14 deletions(-) diff

Re: [PATCH 1/9] scsi/sd: add error handling support for add_disk()

2021-10-18 Thread Luis Chamberlain
On Sat, Oct 16, 2021 at 10:51:48PM -0400, Martin K. Petersen wrote: > > Luis, > > > We never checked for errors on add_disk() as this function returned > > void. Now that this is fixed, use the shiny new error handling. > > > > As with the error handling for device_add() we follow the same logic

[PATCH 6/9] m68k/emu/nfblock: add error handling support for add_disk()

2021-10-15 Thread Luis Chamberlain
We never checked for errors on add_disk() as this function returned void. Now that this is fixed, use the shiny new error handling. Reviewed-by: Geert Uytterhoeven Acked-by: Geert Uytterhoeven Signed-off-by: Luis Chamberlain --- arch/m68k/emu/nfblock.c | 9 +++-- 1 file changed, 7

[PATCH 4/9] bcache: add error handling support for add_disk()

2021-10-15 Thread Luis Chamberlain
We never checked for errors on add_disk() as this function returned void. Now that this is fixed, use the shiny new error handling. This driver doesn't do any unwinding with blk_cleanup_disk() even on errors after add_disk() and so we follow that tradition. Acked-by: Coly Li Signed-off-by: Luis

[PATCH 8/9] rnbd: add error handling support for add_disk()

2021-10-15 Thread Luis Chamberlain
We never checked for errors on add_disk() as this function returned void. Now that this is fixed, use the shiny new error handling. Acked-by: Jack Wang Signed-off-by: Luis Chamberlain --- drivers/block/rnbd/rnbd-clt.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff

[PATCH 9/9] mtd: add add_disk() error handling

2021-10-15 Thread Luis Chamberlain
We never checked for errors on add_disk() as this function returned void. Now that this is fixed, use the shiny new error handling. Acked-by: Miquel Raynal Signed-off-by: Luis Chamberlain --- drivers/mtd/mtd_blkdevs.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git

[PATCH 2/9] scsi/sr: add error handling support for add_disk()

2021-10-15 Thread Luis Chamberlain
We never checked for errors on add_disk() as this function returned void. Now that this is fixed, use the shiny new error handling. Just put the cdrom kref and have the unwinding be done by sr_kref_release(). Reviewed-by: Christoph Hellwig Signed-off-by: Luis Chamberlain --- drivers/scsi/sr.c

[PATCH 3/9] dm: add add_disk() error handling

2021-10-15 Thread Luis Chamberlain
in the error path. The other use case is on the ioctl table_load case. If that fails userspace needs to call the DM_DEV_REMOVE_CMD to cleanup the state - similar to any other failure. Reviewed-by: Hannes Reinecke Signed-off-by: Luis Chamberlain --- drivers/md/dm.c | 4 +++- 1 file changed, 3 insertions

[PATCH 5/9] xen-blkfront: add error handling support for add_disk()

2021-10-15 Thread Luis Chamberlain
was stuffed inside xlvbd_alloc_gendisk() we must repeat the tag free'ing as well. We set the info->rq to NULL to ensure blkif_free() doesn't crash on blk_mq_stop_hw_queues() on device_add_disk() error as the queue will be long gone by then. Reviewed-by: Juergen Gross Signed-off-by: Luis Chamberl

[PATCH 0/9] block: reviewed add_disk() error handling set

2021-10-15 Thread Luis Chamberlain
up yourself. Luis Chamberlain (9): scsi/sd: add error handling support for add_disk() scsi/sr: add error handling support for add_disk() dm: add add_disk() error handling bcache: add error handling support for add_disk() xen-blkfront: add error handling support for add_disk() m68k/emu

[PATCH 7/9] um/drivers/ubd_kern: add error handling support for add_disk()

2021-10-15 Thread Luis Chamberlain
-by: Luis Chamberlain --- arch/um/drivers/ubd_kern.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/arch/um/drivers/ubd_kern.c b/arch/um/drivers/ubd_kern.c index fefd343412c7..69d2d0049a61 100644 --- a/arch/um/drivers/ubd_kern.c +++ b/arch/um/drivers/ubd_kern.c

[PATCH 1/9] scsi/sd: add error handling support for add_disk()

2021-10-15 Thread Luis Chamberlain
-by: Christoph Hellwig Signed-off-by: Luis Chamberlain --- drivers/scsi/sd.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index a646d27df681..d69f2e626e76 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c @@ -3457,7 +3457,13 @@ static

[PATCH v2 01/10] block/brd: add error handling support for add_disk()

2021-09-27 Thread Luis Chamberlain
We never checked for errors on add_disk() as this function returned void. Now that this is fixed, use the shiny new error handling. Signed-off-by: Luis Chamberlain --- drivers/block/brd.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/block/brd.c b

[PATCH v2 06/10] nvdimm/btt: add error handling support for add_disk()

2021-09-27 Thread Luis Chamberlain
We never checked for errors on add_disk() as this function returned void. Now that this is fixed, use the shiny new error handling. Signed-off-by: Luis Chamberlain --- drivers/nvdimm/btt.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/nvdimm/btt.c b/drivers

[PATCH v2 10/10] zram: add error handling support for add_disk()

2021-09-27 Thread Luis Chamberlain
We never checked for errors on add_disk() as this function returned void. Now that this is fixed, use the shiny new error handling. Signed-off-by: Luis Chamberlain --- drivers/block/zram/zram_drv.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/block/zram

[PATCH v2 00/10] block: second batch of add_disk() error handling conversions

2021-09-27 Thread Luis Chamberlain
/kernel/git/mcgrof/linux-next.git/log/?h=20210927-for-axboe-add-disk-error-handling Luis Chamberlain (10): block/brd: add error handling support for add_disk() bcache: add error handling support for add_disk() nvme-multipath: add error handling support for add_disk() nvdimm/btt: do not call

[PATCH v2 09/10] xen-blkfront: add error handling support for add_disk()

2021-09-27 Thread Luis Chamberlain
was stuffed inside xlvbd_alloc_gendisk() we must repeat the tag free'ing as well. We set the info->rq to NULL to ensure blkif_free() doesn't crash on blk_mq_stop_hw_queues() on device_add_disk() error as the queue will be long gone by then. Signed-off-by: Luis Chamberlain --- drivers/block/

[PATCH v2 03/10] nvme-multipath: add error handling support for add_disk()

2021-09-27 Thread Luis Chamberlain
as the cleanup is done elsewhere. We take care and use test_and_set_bit() because it is protects against two nvme paths simultaneously calling device_add_disk() on the same namespace head. Signed-off-by: Luis Chamberlain --- drivers/nvme/host/multipath.c | 13 +++-- 1 file changed, 11

[PATCH v2 04/10] nvdimm/btt: do not call del_gendisk() if not needed

2021-09-27 Thread Luis Chamberlain
We know we don't need del_gendisk() if we haven't added the disk, so just skip it. This should fix a bug on older kernels, as del_gendisk() became able to deal with disks not added only recently, after the patch titled "block: add flag for add_disk() completion notation". Signed-of

[PATCH v2 07/10] nvdimm/blk: avoid calling del_gendisk() on early failures

2021-09-27 Thread Luis Chamberlain
del_gendisk() if nd_integrity_init() fails. I only spotted this issue through code inspection. It does not fix any real world bug. Signed-off-by: Luis Chamberlain --- drivers/nvdimm/blk.c | 17 - 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/drivers/nvdimm/blk.c b

[PATCH v2 08/10] nvdimm/blk: add error handling support for add_disk()

2021-09-27 Thread Luis Chamberlain
not be called unless the disk was already added via add_disk(). The probably of that issue happening is low though, like OOM while calling devm_add_action(), so the fix is minor. We manually unwind in case of add_disk() failure prior to the devm registration. Signed-off-by: Luis Chamberlain

[PATCH v2 02/10] bcache: add error handling support for add_disk()

2021-09-27 Thread Luis Chamberlain
We never checked for errors on add_disk() as this function returned void. Now that this is fixed, use the shiny new error handling. This driver doesn't do any unwinding with blk_cleanup_disk() even on errors after add_disk() and so we follow that tradition. Acked-by: Coly Li Signed-off-by: Luis

[PATCH v2 05/10] nvdimm/btt: use goto error labels on btt_blk_init()

2021-09-27 Thread Luis Chamberlain
This will make it easier to share common error paths. Signed-off-by: Luis Chamberlain --- drivers/nvdimm/btt.c | 19 --- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/drivers/nvdimm/btt.c b/drivers/nvdimm/btt.c index 29cc7325e890..23ee8c005db5 100644

Re: [PATCH 03/10] nvme-multipath: add error handling support for add_disk()

2021-08-30 Thread Luis Chamberlain
On Fri, Aug 27, 2021 at 01:29:32PM -0700, Keith Busch wrote: > On Fri, Aug 27, 2021 at 12:18:02PM -0700, Luis Chamberlain wrote: > > @@ -479,13 +479,17 @@ int nvme_mpath_alloc_disk(struct nvme_ctrl *ctrl, > > struct nvme_ns_head *head) > > static void nvme_mpath_set_li

[PATCH 02/10] bcache: add error handling support for add_disk()

2021-08-27 Thread Luis Chamberlain
We never checked for errors on add_disk() as this function returned void. Now that this is fixed, use the shiny new error handling. This driver doesn't do any unwinding with blk_cleanup_disk() even on errors after add_disk() and so we follow that tradition. Signed-off-by: Luis Chamberlain

[PATCH 09/10] xen-blkfront: add error handling support for add_disk()

2021-08-27 Thread Luis Chamberlain
was stuffed inside xlvbd_alloc_gendisk() we must repeat the tag free'ing as well. We set the info->rq to NULL to ensure blkif_free() doesn't crash on blk_mq_stop_hw_queues() on device_add_disk() error as the queue will be long gone by then. Signed-off-by: Luis Chamberlain --- drivers/block/

[PATCH 01/10] block/brd: add error handling support for add_disk()

2021-08-27 Thread Luis Chamberlain
We never checked for errors on add_disk() as this function returned void. Now that this is fixed, use the shiny new error handling. Signed-off-by: Luis Chamberlain --- drivers/block/brd.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/block/brd.c b

[PATCH 00/10] block: first batch of add_disk() error handling conversions

2021-08-27 Thread Luis Chamberlain
for this work [0] [0] https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux-next.git/log/?h=20210827-for-axboe-add-disk-error-handling-next-2nd Luis Chamberlain (10): block/brd: add error handling support for add_disk() bcache: add error handling support for add_disk() nvme-multipath: add error

[PATCH 04/10] nvdimm/btt: do not call del_gendisk() if not needed

2021-08-27 Thread Luis Chamberlain
We know we don't need del_gendisk() if we haven't added the disk, so just skip it. This should fix a bug on older kernels, as del_gendisk() became able to deal with disks not added only recently, after the patch titled "block: add flag for add_disk() completion notation". Signed-of

Re: [PATCH 00/10] block: first batch of add_disk() error handling conversions

2021-08-27 Thread Luis Chamberlain
Botched the subject. Sorry. this is the *second* batch :) Luis

[PATCH 10/10] zram: add error handling support for add_disk()

2021-08-27 Thread Luis Chamberlain
We never checked for errors on add_disk() as this function returned void. Now that this is fixed, use the shiny new error handling. Signed-off-by: Luis Chamberlain --- drivers/block/zram/zram_drv.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/block/zram

[PATCH 03/10] nvme-multipath: add error handling support for add_disk()

2021-08-27 Thread Luis Chamberlain
as the cleanup is done elsewhere. Signed-off-by: Luis Chamberlain --- drivers/nvme/host/multipath.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/nvme/host/multipath.c b/drivers/nvme/host/multipath.c index 37ce3e8b1db2..f95643629fdb 100644 --- a/drivers/nvme

[PATCH 05/10] nvdimm/btt: use goto error labels on btt_blk_init()

2021-08-27 Thread Luis Chamberlain
This will make it easier to share common error paths. Signed-off-by: Luis Chamberlain --- drivers/nvdimm/btt.c | 19 --- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/drivers/nvdimm/btt.c b/drivers/nvdimm/btt.c index 3fd1bdb9fc05..275704d80109 100644

[PATCH 07/10] nvdimm/blk: avoid calling del_gendisk() on early failures

2021-08-27 Thread Luis Chamberlain
del_gendisk() if nd_integrity_init() fails. I only spotted this issue through code inspection. It does not fix any real world bug. Signed-off-by: Luis Chamberlain --- drivers/nvdimm/blk.c | 17 - 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/drivers/nvdimm/blk.c b

[PATCH 06/10] nvdimm/btt: add error handling support for add_disk()

2021-08-27 Thread Luis Chamberlain
We never checked for errors on add_disk() as this function returned void. Now that this is fixed, use the shiny new error handling. Signed-off-by: Luis Chamberlain --- drivers/nvdimm/btt.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/nvdimm/btt.c b/drivers

[PATCH 08/10] nvdimm/blk: add error handling support for add_disk()

2021-08-27 Thread Luis Chamberlain
not be called unless the disk was already added via add_disk(). The probably of that issue happening is low though, like OOM while calling devm_add_action(), so the fix is minor. We manually unwind in case of add_disk() failure prior to the devm registration. Signed-off-by: Luis Chamberlain

Re: [PATCH v2 1/1] kernel.h: Split out panic and oops helpers

2021-04-09 Thread Luis Chamberlain
u > Acked-by: Rasmus Villemoes > Signed-off-by: Andrew Morton Acked-by: Luis Chamberlain Luis