netconsole: Initialize configfs_item for default targets
authorBreno Leitao <leitao@debian.org>
Thu, 12 Oct 2023 11:13:59 +0000 (04:13 -0700)
committerJakub Kicinski <kuba@kernel.org>
Sat, 14 Oct 2023 00:26:38 +0000 (17:26 -0700)
commit131eeb45b96107b19f9f231d6e81348b471b2ed0
treed3df23aaae908fc16addf7b4afb5371b0f260715
parent28856ab2c0b5b6e87b9a9739a0b59b6ff83689bd
netconsole: Initialize configfs_item for default targets

For netconsole targets allocated during the boot time (passing
netconsole=... argument), netconsole_target->item is not initialized.
That is not a problem because it is not used inside configfs.

An upcoming patch will be using it, thus, initialize the targets with
the name 'cmdline' plus a counter starting from 0.  This name will match
entries in the configfs later.

Suggested-by: Joel Becker <jlbec@evilplan.org>
Signed-off-by: Breno Leitao <leitao@debian.org>
Link: https://lore.kernel.org/r/20231012111401.333798-3-leitao@debian.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/netconsole.c