Re: [PATCH v3 7/9] vdpa: solidrun: Fix UB bug with devres

2024-08-22 Thread Christophe JAILLET
, causes undefined behavior since the stack frame will by then have disappeared. Fix the bug by allocating the strings on the heap through devm_kasprintf(). Cc: sta...@vger.kernel.org # v6.3 Fixes: 51a8f9d7f587 ("virtio: vdpa: new SolidNET DPU driver.") Reported-by: Christophe JAILL

Re: [PATCH v2 7/9] vdpa: solidrun: Fix potential UB bug with devres

2024-08-21 Thread Christophe JAILLET
behavior since the stack frame will by then have disappeared. Fix the bug by allocating the string on the heap through devm_kasprintf(). Cc: sta...@vger.kernel.org # v6.3 Fixes: 51a8f9d7f587 ("virtio: vdpa: new SolidNET DPU driver.") Reported-by: Christophe JAILLET Clos

Re: [PATCH 8/9] vdap: solidrun: Replace deprecated PCI functions

2024-08-20 Thread Christophe JAILLET
Le 20/08/2024 à 10:09, Philipp Stanner a écrit : @@ -556,33 +556,24 @@ static const struct vdpa_config_ops snet_config_ops = {   static int psnet_open_pf_bar(struct pci_dev *pdev, struct psnet *psnet)   {    char name[50]; - int ret, i, mask = 0; + int i; + + snprintf(nam

Re: [PATCH 8/9] vdap: solidrun: Replace deprecated PCI functions

2024-08-19 Thread Christophe JAILLET
Le 19/08/2024 à 18:51, Philipp Stanner a écrit : solidrun utilizes pcim_iomap_regions(), which has been deprecated by the PCI subsystem in commit e354bb84a4c1 ("PCI: Deprecate pcim_iomap_table(), pcim_iomap_regions_request_all()"), among other things because it forces usage of quite a complicated

[PATCH] mtip32xx: Fix an error handling path in 'mtip_pci_probe()'

2018-05-10 Thread Christophe JAILLET
Branch to the right label in the error handling path in order to keep it logical. Signed-off-by: Christophe JAILLET --- drivers/block/mtip32xx/mtip32xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/block/mtip32xx/mtip32xx.c b/drivers/block/mtip32xx/mtip32xx.c

[PATCH] lightnvm: Fix error handling

2017-02-19 Thread Christophe JAILLET
According to error handling in this function, it is likely that going to 'out' was expected here. Signed-off-by: Christophe JAILLET --- drivers/lightnvm/rrpc.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/lightnvm/rrpc.c b/drivers/lightnvm/rr