[PATCH] dax: make sure inodes are flushed before destroy cache

2022-02-11 Thread Tong Zhang
_fs_exit() not flushing inodes before destroy cache. To fix this issue, call rcu_barrier() before destroy cache. Signed-off-by: Tong Zhang --- drivers/dax/super.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/dax/super.c b/drivers/dax/super.c index e3029389d809..6bd565fe2e63 100644 --- a

[PATCH v3] qnx4: fix use-after-free caused by strlen

2021-03-22 Thread Tong Zhang
Signed-off-by: Tong Zhang Signed-off-by: Anders Larsen --- v2: The name can grow longer than QNX4_SHORT_NAME_MAX if de is a QNX4_FILE_LINK type and de should points to a qnx4_link_info struct, so this is safe. We also remove redundant checks in this version. v3: make commit log short and resend

[PATCH 1/2] scsi: myrb: fix null-ptr-dereference in myrb_cleanup

2021-03-21 Thread Tong Zhang
010) - not-present page [1.413138] RIP: 0010:0x0 [1.417711] myrb_cleanup+0x13f/0x1b0 [myrb] [1.417939] myrb_probe.cold+0xc6/0x6fc [myrb] Signed-off-by: Tong Zhang --- drivers/scsi/myrb.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/myrb.c b/drivers/s

[PATCH 2/2] scsi: myrb: fix null-ptr-dereference in myrb_probe

2021-03-21 Thread Tong Zhang
720] myrb_probe.cold+0x22/0xabc [myrb] [5.083510] local_pci_probe+0x6f/0xb0 Fixes: 081ff398c56c ("scsi: myrb: Add Mylex RAID controller (block interface)") Signed-off-by: Tong Zhang --- drivers/scsi/myrb.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/scsi/myrb.c b/drivers/scsi

[PATCH 0/2] scsi: myrb: fix null-ptr-dereference issues

2021-03-21 Thread Tong Zhang
This series fixes two null-ptr-dereference issues in the myrb driver. Both are caused by uninitialized variables. Tong Zhang (2): scsi: myrb: fix null-ptr-dereference in myrb_cleanup scsi: myrb: fix null-ptr-dereference in myrb_probe drivers/scsi/myrb.c | 4 +++- 1 file changed, 3

[PATCH] scsi: dc395x: fix null-ptr-dereference in adapter_uninit

2021-03-21 Thread Tong Zhang
] [1.445439] Call Trace: [1.445573] dc395x_init_one.cold+0x72a/0x9bb [dc395x] [1.445849] local_pci_probe+0x48/0x80 Signed-off-by: Tong Zhang --- drivers/scsi/dc395x.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/scsi/dc395x.c b/drivers/scsi/dc395x.c index 3ea345c12467

Re: [PATCH v2 0/3] ALSA: hdsp and hdspm, don't disable device if not enabled

2021-03-21 Thread Tong Zhang
On Sun, Mar 21, 2021 at 4:16 AM Takashi Iwai wrote: > > On Sat, 20 Mar 2021 23:23:33 +0100, > Tong Zhang wrote: > > > > This series fixes issues in hdsp and hdspm. The drivers in question want > > to disable a device that is not enabled on error path. > > > &

[PATCH v3 3/3] ALSA: rme9652: don't disable if not enabled

2021-03-21 Thread Tong Zhang
] snd_card_free+0x61/0x90 [snd] [1.761454] snd_rme9652_probe+0x3be/0x700 [snd_rme9652] Suggested-by: Takashi Iwai Signed-off-by: Tong Zhang --- sound/pci/rme9652/rme9652.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sound/pci/rme9652/rme9652.c b/sound/pci/rme9652/rme9652.c

[PATCH v3 2/3] ALSA: hdspm: don't disable if not enabled

2021-03-21 Thread Tong Zhang
+0x61/0x90 [snd] [1.796659] snd_hdspm_probe+0x97b/0x1440 [snd_hdspm] Suggested-by: Takashi Iwai Signed-off-by: Tong Zhang --- sound/pci/rme9652/hdspm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sound/pci/rme9652/hdspm.c b/sound/pci/rme9652/hdspm.c index 8d900c132f0f

[PATCH v3 1/3] ALSA: hdsp: don't disable if not enabled

2021-03-21 Thread Tong Zhang
/0x90 [snd] [1.768430] snd_hdsp_probe+0x524/0x5e0 [snd_hdsp] Suggested-by: Takashi Iwai Signed-off-by: Tong Zhang --- sound/pci/rme9652/hdsp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sound/pci/rme9652/hdsp.c b/sound/pci/rme9652/hdsp.c index 4cf879c42dc4

[PATCH v3 0/3] ALSA: rme9652 don't disable device if not enabled

2021-03-21 Thread Tong Zhang
This series fixes issues in hdsp and hdspm. The drivers in question want to disable a device that is not enabled on error path. v2: add fix to rme9652 v3: change checks to pci_is_enabled() Tong Zhang (3): ALSA: hdsp: don't disable if not enabled ALSA: hdspm: don't disable if not enabled

Re: [PATCH] drm/radeon: don't evict if not initialized

2021-03-21 Thread Tong Zhang
Thanks, Fixed as suggested and sent as v2. - Tong On Sun, Mar 21, 2021 at 9:26 AM Christian König wrote: > > > > Am 20.03.21 um 21:10 schrieb Tong Zhang: > > TTM_PL_VRAM may not initialized at all when calling > > radeon_bo_evict_vram(). We need to che

[PATCH v2] drm/radeon: don't evict if not initialized

2021-03-21 Thread Tong Zhang
/0xa0 [radeon] [2.169534] radeon_driver_load_kms+0x174/0x210 [radeon] [2.169843] drm_dev_register+0xd9/0x1c0 [drm] [2.170104] radeon_pci_probe+0x117/0x1a0 [radeon] Suggested-by: Christian König Signed-off-by: Tong Zhang --- v2: coding style fix drivers/gpu/drm/radeon/radeon_object.c

[PATCH] PCI: hotplug: fix null-ptr-dereferencd in cpcihp error path

2021-03-20 Thread Tong Zhang
[cpcihp_zt5550] Signed-off-by: Tong Zhang --- drivers/pci/hotplug/cpci_hotplug_core.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/pci/hotplug/cpci_hotplug_core.c b/drivers/pci/hotplug/cpci_hotplug_core.c index d0559d2faf50..b44da397d631 100644 --- a/drivers

[PATCH] scsi: sym53c8xx_2: Fix WARN_ON in __sym_mfree_dma

2021-03-20 Thread Tong Zhang
] sym2_probe.cold+0x3e3/0x555 [sym53c8xx] Signed-off-by: Tong Zhang --- drivers/scsi/sym53c8xx_2/sym_malloc.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/scsi/sym53c8xx_2/sym_malloc.c b/drivers/scsi/sym53c8xx_2/sym_malloc.c index eb5c045c7c59..54ec7e7bf87f 100644

[PATCH v2 3/3] ALSA: rme9652: don't disable if not enabled

2021-03-20 Thread Tong Zhang
] snd_card_free+0x61/0x90 [snd] [1.761454] snd_rme9652_probe+0x3be/0x700 [snd_rme9652] Signed-off-by: Tong Zhang --- sound/pci/rme9652/rme9652.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sound/pci/rme9652/rme9652.c b/sound/pci/rme9652/rme9652.c index 4df992e846f2

[PATCH v2 2/3] ALSA: hdspm: don't disable if not enabled

2021-03-20 Thread Tong Zhang
+0x61/0x90 [snd] [1.796659] snd_hdspm_probe+0x97b/0x1440 [snd_hdspm] Signed-off-by: Tong Zhang --- sound/pci/rme9652/hdspm.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sound/pci/rme9652/hdspm.c b/sound/pci/rme9652/hdspm.c index 8d900c132f0f..af3898c88bba

[PATCH v2 0/3] ALSA: hdsp and hdspm, don't disable device if not enabled

2021-03-20 Thread Tong Zhang
This series fixes issues in hdsp and hdspm. The drivers in question want to disable a device that is not enabled on error path. v2: add fix to rme9652 Tong Zhang (3): ALSA: hdsp: don't disable if not enabled ALSA: hdspm: don't disable if not enabled ALSA: rme9652: don't disable

[PATCH v2 1/3] ALSA: hdsp: don't disable if not enabled

2021-03-20 Thread Tong Zhang
/0x90 [snd] [1.768430] snd_hdsp_probe+0x524/0x5e0 [snd_hdsp] Signed-off-by: Tong Zhang --- sound/pci/rme9652/hdsp.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sound/pci/rme9652/hdsp.c b/sound/pci/rme9652/hdsp.c index 4cf879c42dc4..d9879a5bd60e 100644

[PATCH 2/2] ALSA: hdspm: don't disable if not enabled

2021-03-20 Thread Tong Zhang
+0x61/0x90 [snd] [1.796659] snd_hdspm_probe+0x97b/0x1440 [snd_hdspm] Signed-off-by: Tong Zhang --- sound/pci/rme9652/hdspm.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sound/pci/rme9652/hdspm.c b/sound/pci/rme9652/hdspm.c index 8d900c132f0f..af3898c88bba

[PATCH 1/2] ALSA: hdsp: don't disable if not enabled

2021-03-20 Thread Tong Zhang
/0x90 [snd] [1.768430] snd_hdsp_probe+0x524/0x5e0 [snd_hdsp] Signed-off-by: Tong Zhang --- sound/pci/rme9652/hdsp.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sound/pci/rme9652/hdsp.c b/sound/pci/rme9652/hdsp.c index 4cf879c42dc4..d9879a5bd60e 100644

[PATCH 0/2] ALSA: hdsp and hdspm, don't disable device if not enabled

2021-03-20 Thread Tong Zhang
This series fixes issues in hdsp and hdspm. The drivers in question want to disable a device that is not enabled on error path. Tong Zhang (2): ALSA: hdsp: don't disable if not enabled ALSA: hdspm: don't disable if not enabled sound/pci/rme9652/hdsp.c | 10 ++ sound/pci/rme9652

Re: [PATCH v1 1/5] mfd: intel_quark_i2c_gpio: revert "Constify static struct resources"

2021-03-20 Thread Tong Zhang
Tested-by: Tong Zhang

[PATCH] drm/radeon: don't evict if not initialized

2021-03-20 Thread Tong Zhang
/0xa0 [radeon] [2.169534] radeon_driver_load_kms+0x174/0x210 [radeon] [2.169843] drm_dev_register+0xd9/0x1c0 [drm] [2.170104] radeon_pci_probe+0x117/0x1a0 [radeon] Signed-off-by: Tong Zhang --- drivers/gpu/drm/radeon/radeon_object.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion

[PATCH] mfd: intel_quark_i2c_gpio: fix write to const mem

2021-03-20 Thread Tong Zhang
) - permissions violation [1.322419] RIP: 0010:intel_quark_mfd_probe+0xb7/0x23e [intel_quark_i2c_gpio] [1.327670] Call Trace: [1.327800] local_pci_probe+0x48/0x80 Fixes: c4a164f41554 (mfd: Constify static struct resources) Signed-off-by: Tong Zhang --- drivers/mfd

Re: [PATCH] staging: comedi: das800: fix request_irq() warn

2021-03-18 Thread Tong Zhang
Thank you all, I fixed the commit log and resent as v2. Thanks, - Tong On Wed, Mar 17, 2021 at 8:48 AM Ian Abbott wrote: > > On 16/03/2021 22:42, Tong Zhang wrote: > > request_irq() wont accept a name which contains slash so we need to > > repalce it with something

[PATCH v2] staging: comedi: das800: fix request_irq() warn

2021-03-18 Thread Tong Zhang
the parameters passed to request_irq() Suggested-by: Ian Abbott Signed-off-by: Tong Zhang Reviewed-by: Ian Abbott --- v2: fix commit log drivers/staging/comedi/drivers/das800.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/comedi/drivers/das800.c b/drivers/staging

Re: [PATCH v4 2/2] crypto: qat: ADF_STATUS_PF_RUNNING should be set after adf_dev_init

2021-03-18 Thread Tong Zhang
crypto: qat - > not > crypto: qat : > > Regards, > > -- > Giovanni > > On Thu, Mar 18, 2021 at 12:21:05PM -0400, Tong Zhang wrote: > > ADF_STATUS_PF_RUNNING is (only) used and checked by adf_vf2pf_shutdown() > > before calling adf_iov_put

[PATCH v5 1/2] crypto: qat - don't release uninitialized resources

2021-03-18 Thread Tong Zhang
free_irq+0x202/0x380 [1.801340] Call Trace: [1.801477] adf_vf_isr_resource_free+0x32/0xb0 [intel_qat] [1.801785] adf_vf_isr_resource_alloc+0x14d/0x150 [intel_qat] [1.802105] adf_dev_init+0xba/0x140 [intel_qat] Signed-off-by: Tong Zhang Reviewed-by: Andy Shevchenko Fixes: dd0f368398ea

[PATCH v5 2/2] crypto: qat - ADF_STATUS_PF_RUNNING should be set after adf_dev_init

2021-03-18 Thread Tong Zhang
qat] [7.183541] adf_vf2pf_shutdown+0x4d/0x7b [intel_qat] [7.183834] adf_dev_shutdown+0x172/0x2b0 [intel_qat] [7.184127] adf_probe+0x5e9/0x600 [qat_dh895xccvf] Signed-off-by: Tong Zhang Reviewed-by: Andy Shevchenko Fixes: 25c6ffb249f6 ("crypto: qat - check if PF is running") Acked

[PATCH v5 0/2] crypto: qat - fix couple crashes duing error handling

2021-03-18 Thread Tong Zhang
by Andy Shevchenko v4: fix commit log typos v5: fix headline Tong Zhang (2): crypto: qat - don't release uninitialized resources crypto: qat - ADF_STATUS_PF_RUNNING should be set after adf_dev_init drivers/crypto/qat/qat_c3xxxvf/adf_drv.c| 4 ++-- drivers/crypto/qat/qat_c62xvf

Re: [PATCH v3 1/2] crypto: qat - dont release uninitialized resources

2021-03-18 Thread Tong Zhang
Thanks! I have fixed typos and resent them as v4. - Tong

[PATCH v4 2/2] crypto: qat: ADF_STATUS_PF_RUNNING should be set after adf_dev_init

2021-03-18 Thread Tong Zhang
qat] [7.183541] adf_vf2pf_shutdown+0x4d/0x7b [intel_qat] [7.183834] adf_dev_shutdown+0x172/0x2b0 [intel_qat] [7.184127] adf_probe+0x5e9/0x600 [qat_dh895xccvf] Signed-off-by: Tong Zhang Reviewed-by: Andy Shevchenko Fixes: 25c6ffb249f6 ("crypto: qat - check if PF is running") Acked

[PATCH v4 1/2] crypto: qat - don't release uninitialized resources

2021-03-18 Thread Tong Zhang
free_irq+0x202/0x380 [1.801340] Call Trace: [1.801477] adf_vf_isr_resource_free+0x32/0xb0 [intel_qat] [1.801785] adf_vf_isr_resource_alloc+0x14d/0x150 [intel_qat] [1.802105] adf_dev_init+0xba/0x140 [intel_qat] Signed-off-by: Tong Zhang Reviewed-by: Andy Shevchenko Fixes: dd0f368398ea

[PATCH v4 0/2] crypto: qat: fix couple crashes duing error handling

2021-03-18 Thread Tong Zhang
by Andy Shevchenko v4: fix commit log typos Tong Zhang (2): crypto: qat - dont release uninitialized resources crypto: qat: ADF_STATUS_PF_RUNNING should be set after adf_dev_init drivers/crypto/qat/qat_c3xxxvf/adf_drv.c| 4 ++-- drivers/crypto/qat/qat_c62xvf/adf_drv.c | 4

Re: [PATCH] usb: gadget: udc: amd5536udc_pci fix crash if dma is used

2021-03-17 Thread Tong Zhang
Hi Greg, Thanks for the comments. I tried to find the commit that introduced the use of dev->dev in init_dma_pools() and added that commit to the Fixes tag in v2 patch. Please see if this one works. Thanks, - Tong

[PATCH v2] usb: gadget: udc: amd5536udc_pci fix null-ptr-dereference

2021-03-17 Thread Tong Zhang
ol_create') Signed-off-by: Tong Zhang --- v2: add Fixes tag and revise subject drivers/usb/gadget/udc/amd5536udc_pci.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/usb/gadget/udc/amd5536udc_pci.c b/drivers/usb/gadget/udc/amd5536udc_pci.c index 8d3

Re: [PATCH] staging: comedi: das800: fix request_irq() warn

2021-03-17 Thread Tong Zhang
Thanks for sharing those best practices, Dan. I was wondering if there is a spelling checker for git.

Re: [PATCH] staging: comedi: replace slash in name

2021-03-16 Thread Tong Zhang
On Tue, Mar 16, 2021 at 6:37 AM Ian Abbott wrote: > > Thanks. I think the only other Comedi driver with the same problem is > "drivers/staging/comedi/drivers/das800.c". It passes dev->board_name as > the name argument of request_irq(), but that is "cio-das802/16" for one > of the boards

[PATCH] staging: comedi: das800: fix request_irq() warn

2021-03-16 Thread Tong Zhang
the parameters passed to request_irq() Suggested-by: Ian Abbott Signed-off-by: Tong Zhang --- drivers/staging/comedi/drivers/das800.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/comedi/drivers/das800.c b/drivers/staging/comedi/drivers/das800.c index 2881808d6606

Re: [PATCH] staging: comedi: replace slash in name

2021-03-15 Thread Tong Zhang
Thanks Ian, I have submitted a v2 patch based on your suggestions. Thanks, - Tong On Mon, Mar 15, 2021 at 6:48 AM Ian Abbott wrote: > > On 15/03/2021 10:44, Ian Abbott wrote: > > On 14/03/2021 03:57, Tong Zhang wrote: > >> request_irq() wont accept a name which cont

[PATCH v2] staging: comedi: cb_pcidas: fix request_irq() warn

2021-03-15 Thread Tong Zhang
] request_threaded_irq+0xfe/0x160 [1.642186] cb_pcidas_auto_attach+0xf4/0x610 [cb_pcidas] Suggested-by: Ian Abbott Signed-off-by: Tong Zhang --- v2: revert changes to .name field so that we dont break userspace drivers/staging/comedi/drivers/cb_pcidas.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH v2] staging: comedi: cb_pcidas64: fix request_irq() warn

2021-03-15 Thread Tong Zhang
] request_threaded_irq+0xfe/0x160 [1.576859] auto_attach+0x60a/0xc40 [cb_pcidas64] Suggested-by: Ian Abbott Signed-off-by: Tong Zhang --- v2: revert changes to .name field so that we dont break userspace drivers/staging/comedi/drivers/cb_pcidas64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH] net: arcnet: com20020 fix error handling

2021-03-14 Thread Tong Zhang
: [1.536939] com20020pci_probe+0x3f2/0x48c [com20020_pci] [1.537226] local_pci_probe+0x48/0x80 [1.539918] com20020pci_init+0x3f/0x1000 [com20020_pci] Signed-off-by: Tong Zhang --- drivers/net/arcnet/com20020-pci.c | 34 +-- 1 file changed, 19 insertions(+), 15

[PATCH] staging: comedi: cb_pcidas: replace slash in name

2021-03-13 Thread Tong Zhang
__xlate_proc_name+0x93/0xb0 [1.634009] RIP: 0010:__xlate_proc_name+0x93/0xb0 [1.639441] Call Trace: [1.639976] proc_mkdir+0x18/0x20 [1.641946] request_threaded_irq+0xfe/0x160 [1.642186] cb_pcidas_auto_attach+0xf4/0x610 [cb_pcidas] Signed-off-by: Tong Zhang --- drivers/staging

[PATCH] staging: comedi: replace slash in name

2021-03-13 Thread Tong Zhang
__xlate_proc_name+0x93/0xb0 [1.568923] RIP: 0010:__xlate_proc_name+0x93/0xb0 [1.574200] Call Trace: [1.574722] proc_mkdir+0x18/0x20 [1.576629] request_threaded_irq+0xfe/0x160 [1.576859] auto_attach+0x60a/0xc40 [cb_pcidas64] Signed-off-by: Tong Zhang --- drivers/staging/comedi

[PATCH] usb: gadget: udc: amd5536udc_pci fix crash if dma is used

2021-03-13 Thread Tong Zhang
RIP: 0010:dma_pool_create+0x83/0x290 [1.323257] Call Trace: [1.323390] ? pci_write_config_word+0x27/0x30 [1.323626] init_dma_pools+0x41/0x1a0 [snps_udc_core] [1.323899] udc_pci_probe+0x202/0x2b1 [amd5536udc_pci] Signed-off-by: Tong Zhang --- drivers/usb/gadget/udc/amd5536udc_pci.c | 10

Re: [PATCH v2 2/2] crypto: qat: ADF_STATUS_PF_RUNNING should be set after adf_dev_init

2021-03-12 Thread Tong Zhang
Thanks Andy, I have sent v3 with the suggested tag fix. - Tong

[PATCH v3 2/2] crypto: qat: ADF_STATUS_PF_RUNNING should be set after adf_dev_init

2021-03-12 Thread Tong Zhang
qat] [7.183541] adf_vf2pf_shutdown+0x4d/0x7b [intel_qat] [7.183834] adf_dev_shutdown+0x172/0x2b0 [intel_qat] [7.184127] adf_probe+0x5e9/0x600 [qat_dh895xccvf] Signed-off-by: Tong Zhang Reviewed-by: Andy Shevchenko --- drivers/crypto/qat/qat_c3xxxvf/adf_drv.c| 4 ++-- drivers/crypto/

[PATCH v3 1/2] crypto: qat - dont release uninitialized resources

2021-03-12 Thread Tong Zhang
free_irq+0x202/0x380 [1.801340] Call Trace: [1.801477] adf_vf_isr_resource_free+0x32/0xb0 [intel_qat] [1.801785] adf_vf_isr_resource_alloc+0x14d/0x150 [intel_qat] [1.802105] adf_dev_init+0xba/0x140 [intel_qat] Signed-off-by: Tong Zhang Reviewed-by: Andy Shevchenko --- drivers/crypto

[PATCH v3 0/2] crypto: qat: fix couple crashes duing error handling

2021-03-12 Thread Tong Zhang
by Andy Shevchenko Tong Zhang (2): crypto: qat - dont release uninitialized resources crypto: qat: ADF_STATUS_PF_RUNNING should be set after adf_dev_init drivers/crypto/qat/qat_c3xxxvf/adf_drv.c| 4 ++-- drivers/crypto/qat/qat_c62xvf/adf_drv.c | 4 ++-- drivers/crypto/qat

Re: [PATCH v2 2/2] crypto: qat: ADF_STATUS_PF_RUNNING should be set after adf_dev_init

2021-03-12 Thread Tong Zhang
Hi Andy, I am not really sure this reviewed by line should be added by me -- IMHO from my past experience this line is added by the actual person who reviewed it on a per-patch and version basis I can send out another revision adding this Reviewed-by line if you think this is something should be

Re: [PATCH v2 2/2] crypto: qat: ADF_STATUS_PF_RUNNING should be set after adf_dev_init

2021-03-12 Thread Tong Zhang
Hi Andy, Complete newbie here, could you please remind me of the tag you are referring to? I am not really familiar with the process. Thanks, - Tong On Fri, Mar 12, 2021 at 10:35 AM Andy Shevchenko wrote: > > On Fri, Mar 12, 2021 at 4:21 PM Tong Zhang wrote: > > > > ADF

Re: [PATCH 2/2] crypto: qat: ADF_STATUS_PF_RUNNING should be set after adf_dev_init

2021-03-12 Thread Tong Zhang
Hi Andy, Thanks for the suggestion. I have removed excessive lines in the commit log and sent out a v2 patch. Thanks again. - Tong On Fri, Mar 12, 2021 at 3:56 AM Andy Shevchenko wrote: > > On Fri, Mar 12, 2021 at 9:50 AM Tong Zhang wrote: > > > > ADF_STATUS_PF_RUNN

[PATCH v2 2/2] crypto: qat: ADF_STATUS_PF_RUNNING should be set after adf_dev_init

2021-03-12 Thread Tong Zhang
qat] [7.183541] adf_vf2pf_shutdown+0x4d/0x7b [intel_qat] [7.183834] adf_dev_shutdown+0x172/0x2b0 [intel_qat] [7.184127] adf_probe+0x5e9/0x600 [qat_dh895xccvf] Signed-off-by: Tong Zhang --- drivers/crypto/qat/qat_c3xxxvf/adf_drv.c| 4 ++-- drivers/crypto/qat/qat_c62xvf/adf_drv.c

[PATCH v2 1/2] crypto: qat - dont release uninitialized resources

2021-03-12 Thread Tong Zhang
free_irq+0x202/0x380 [1.801340] Call Trace: [1.801477] adf_vf_isr_resource_free+0x32/0xb0 [intel_qat] [1.801785] adf_vf_isr_resource_alloc+0x14d/0x150 [intel_qat] [1.802105] adf_dev_init+0xba/0x140 [intel_qat] Signed-off-by: Tong Zhang --- drivers/crypto/qat/qat_common/adf_vf_isr.c

[PATCH v2 0/2] crypto: qat: fix couple crashes duing error handling

2021-03-12 Thread Tong Zhang
There are a couple of issues in qat error handling. Those drivers tries to release resources that is not initialized. This patch series tries to fix crashes caused by incorrect error handling. v2: removed excessive dump in commit log Tong Zhang (2): crypto: qat - dont release uninitialized

[PATCH 1/2] crypto: qat - dont release uninitialized resources

2021-03-11 Thread Tong Zhang
DR6: fffe0ff0 DR7: 0400 Signed-off-by: Tong Zhang --- drivers/crypto/qat/qat_common/adf_vf_isr.c | 17 + 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/drivers/crypto/qat/qat_common/adf_vf_isr.c b/drivers/crypto/qat/qat_common/adf_vf_isr.c index

[PATCH 2/2] crypto: qat: ADF_STATUS_PF_RUNNING should be set after adf_dev_init

2021-03-11 Thread Tong Zhang
372] == Signed-off-by: Tong Zhang --- drivers/crypto/qat/qat_c3xxxvf/adf_drv.c| 4 ++-- drivers/crypto/qat/qat_c62xvf/adf_drv.c | 4 ++-- drivers/crypto/qat/qat_dh895xccvf/adf_drv.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --

[PATCH 0/2] crypto: qat: fix couple crashes duing error handling

2021-03-11 Thread Tong Zhang
There are a couple of issues in qat error handling. Those drivers tries to release resources that is not initialized. This patch series tries to fix crashes caused by incorrect error handling. Tong Zhang (2): crypto: qat - dont release uninitialized resources crypto: qat

[PATCH] isdn: remove extra spaces in the header file

2021-03-10 Thread Tong Zhang
fix some coding style issues in the isdn header Signed-off-by: Tong Zhang --- drivers/isdn/hardware/mISDN/iohelper.h | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/isdn/hardware/mISDN/iohelper.h b/drivers/isdn/hardware/mISDN/iohelper.h index

[PATCH] mISDN: fix crash in fritzpci

2021-03-10 Thread Tong Zhang
6a0 [1.749073] __do_sys_finit_module+0xc2/0x120 [1.749307] ? __do_sys_finit_module+0xc2/0x120 [1.749549] __x64_sys_finit_module+0x1a/0x20 [1.749782] do_syscall_64+0x38/0x90 Signed-off-by: Tong Zhang --- drivers/isdn/hardware/mISDN/mISDNipac.c | 2 +- 1 file changed, 1 insertion(+)

Re: [PATCH 0/3] fix a couple of atm->phy_data related issues

2021-03-08 Thread Tong Zhang
n use since at least back when Linus switched over > to git in 2005. > > Thanks, > > - Alex > > On Mon, Mar 8, 2021 at 9:55 AM Tong Zhang wrote: > > > > Hi Alex, > > attached is the kernel log for zatm(uPD98402) -- I also have > > idt77252's log -- which i

Re: [PATCH 0/3] fix a couple of atm->phy_data related issues

2021-03-08 Thread Tong Zhang
] R13: R14: 01092dd0 R15: 0001 On Mon, Mar 8, 2021 at 12:47 PM Alexander Duyck wrote: > > On Mon, Mar 8, 2021 at 12:39 AM Tong Zhang wrote: > > > > there are two drivers(zatm and idt77252) using PRIV() (i.e. atm->phy_data) > > to store p

[PATCH 3/3] atm: idt77252: fix null-ptr-dereference

2021-03-07 Thread Tong Zhang
tly. Signed-off-by: Tong Zhang --- drivers/atm/idt77105.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/atm/idt77105.c b/drivers/atm/idt77105.c index 3c081b6171a8..bfca7b8a6f31 100644 --- a/drivers/atm/idt77105.c +++ b/drivers/atm/idt77105.c @@ -262,7 +262,7 @@ static

[PATCH 2/3] atm: uPD98402: fix incorrect allocation

2021-03-07 Thread Tong Zhang
hy_data instead of dev_data. Signed-off-by: Tong Zhang --- drivers/atm/uPD98402.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/atm/uPD98402.c b/drivers/atm/uPD98402.c index 7850758b5bb8..239852d85558 100644 --- a/drivers/atm/uPD98402.c +++ b/drivers/atm/uPD98402.c @

[PATCH 1/3] atm: fix a typo in the struct description

2021-03-07 Thread Tong Zhang
phy_data means private PHY data not date Signed-off-by: Tong Zhang --- include/linux/atmdev.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/atmdev.h b/include/linux/atmdev.h index 60cd25c0461b..9b02961d65ee 100644 --- a/include/linux/atmdev.h +++ b/include

[PATCH 0/3] fix a couple of atm->phy_data related issues

2021-03-07 Thread Tong Zhang
a typo in atm struct. Tong Zhang (3): atm: fix a typo in the struct description atm: uPD98402: fix incorrect allocation atm: idt77252: fix null-ptr-dereference drivers/atm/idt77105.c | 4 ++-- drivers/atm/uPD98402.c | 2 +- include/linux/atmdev.h | 2 +- 3 files changed, 4 insertions

Re: [PATCH] drm/fb-helper: only unmap if buffer not null

2021-03-01 Thread Tong Zhang
mains NULL -- Since there could be the case that the fb_probe is never called, a subsequent modprobe -r will cause the following drm_client_buffer_vunmap(NULL) in drm_fbdev_cleanup() Best, - Tong On Mon, Mar 1, 2021 at 3:26 AM Thomas Zimmermann wrote: > > Hi > > Am 28.02.21 um 05:46 schrieb To

[PATCH v2] can: c_can: move runtime PM enable/disable to c_can_platform

2021-03-01 Thread Tong Zhang
Currently doing modprobe c_can_pci will make kernel complain "Unbalanced pm_runtime_enable!", this is caused by pm_runtime_enable() called before pm is initialized. This fix is similar to 227619c3ff7c, move those pm_enable/disable code to c_can_platform. Signed-off-by: Tong Zhang --

Re: [PATCH] can: c_can: move runtime PM enable/disable to c_can_platform

2021-03-01 Thread Tong Zhang
On Mon, Mar 1, 2021 at 2:49 PM Marc Kleine-Budde wrote: > > On 28.02.2021 23:15:48, Tong Zhang wrote: > > Currently doing modprobe c_can_pci will make kernel complain > > "Unbalanced pm_runtime_enable!", this is caused by pm_runtime_enable() > > called before pm

[PATCH] can: c_can: move runtime PM enable/disable to c_can_platform

2021-02-28 Thread Tong Zhang
pm_enable/disable code to c_can_platform. Signed-off-by: Tong Zhang --- drivers/net/can/c_can/c_can.c | 26 ++ drivers/net/can/c_can/c_can_platform.c | 6 +- 2 files changed, 7 insertions(+), 25 deletions(-) diff --git a/drivers/net/can/c_can/c_can.c b/drivers/net

[PATCH] can: c_can_pci: fix use-after-free

2021-02-28 Thread Tong Zhang
ff ff [ 1795.762392] == Signed-off-by: Tong Zhang --- drivers/net/can/c_can/c_can_pci.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/can/c_can/c_can_pci.c b/drivers/net/can/c_can/c_can_pci.c

[PATCH] video: fbdev: sis: catch out of bounds in SiS_DoCalcDelay

2021-02-27 Thread Tong Zhang
f9 [4.772384] c0048c00: f9 f9 f9 f9 00 00 00 f9 f9 f9 f9 f9 00 f9 f9 f9 [4.772385] == Signed-off-by: Tong Zhang --- drivers/video/fbdev/sis/init.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/video/fb

[PATCH] drm/fb-helper: only unmap if buffer not null

2021-02-27 Thread Tong Zhang
+0x3e4/0x580 [ 199.137481] ? fpregs_assert_state_consistent+0x4d/0x60 [ 199.137767] ? exit_to_user_mode_prepare+0x2f/0x130 [ 199.138037] do_syscall_64+0x33/0x40 [ 199.138237] entry_SYSCALL_64_after_hwframe+0x44/0xae [ 199.138517] RIP: 0033:0x7f36fdc3dcf7 Signed-off-by: Tong Zhang --- dri

[PATCH] atm: lanai: dont run lanai_dev_close if not open

2021-02-27 Thread Tong Zhang
00 [8.353397] DR3: DR6: fffe0ff0 DR7: 0400 [8.353958] modprobe (95) used greatest stack depth: 26216 bytes left Signed-off-by: Tong Zhang --- drivers/atm/lanai.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/atm/lan

[PATCH] atm: eni: dont release is never initialized

2021-02-27 Thread Tong Zhang
4.891691] R10: 7ff62fd55300 R11: 0246 R12: 00f2b9e0 [4.892064] R13: R14: 00f2bdd0 R15: 0001 [4.892439] == Signed-off-by: Tong Zhang --- drivers/atm/eni.c | 3 ++- 1

Re: [PATCH] video: fbdev: pm2fb: avoid stall on fb_sync

2021-02-24 Thread Tong Zhang
, 2021 at 6:35 AM Geert Uytterhoeven wrote: > > Hi Tong, > > On Sun, Feb 21, 2021 at 1:05 AM Tong Zhang wrote: > > On Sat, Feb 20, 2021 at 6:33 PM Randy Dunlap wrote: > > > On 2/20/21 3:02 PM, Tong Zhang wrote: > > > > pm2fb_sync is called when doing /dev

[PATCH] drm/ast: fix memory leak when unload the driver

2021-02-21 Thread Tong Zhang
] [drm:drm_mode_config_cleanup] *ERROR* connector VGA-1 leaked! Signed-off-by: Tong Zhang --- drivers/gpu/drm/ast/ast_drv.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/ast/ast_drv.c b/drivers/gpu/drm/ast/ast_drv.c index 667b450606ef..b047c0ea43e8 100644 --- a/drivers/gpu/drm/ast/ast_drv.c +++ b

Re: [PATCH v2] video: fbdev: pm2fb: avoid stall on fb_sync

2021-02-20 Thread Tong Zhang
On Sat, Feb 20, 2021 at 7:36 PM Randy Dunlap wrote: > I suppose the rest of the patch is OK since it works for you. > > I don't know any of this code. It would be nice to know what some > of those pm2_RD(par, SOME_REG) mean so that I could sort of > understand what it is doing, but don't go

[PATCH v3] video: fbdev: pm2fb: avoid stall on fb_sync

2021-02-20 Thread Tong Zhang
: 0871 R11: 0246 R12: 0800 [ 39.538008] R13: 56491a6ad000 R14: 0200 R15: Signed-off-by: Tong Zhang --- v3: initialize timeout_fifo to 0, and added comment for WAIT_FIFO_TIMEOUT v2: fix typo and add console log according

Re: [PATCH] video: fbdev: pm2fb: avoid stall on fb_sync

2021-02-20 Thread Tong Zhang
Hi Randy, Thanks for the comment. I currently have this problem on my machine. I have submitted a revised patch -- which includes the console log. Thanks! - Tong On Sat, Feb 20, 2021 at 6:33 PM Randy Dunlap wrote: > > Hi-- > > On 2/20/21 3:02 PM, Tong Zhang wrote: > > pm2fb_s

[PATCH v2] video: fbdev: pm2fb: avoid stall on fb_sync

2021-02-20 Thread Tong Zhang
: 0871 R11: 0246 R12: 0800 [ 39.538008] R13: 56491a6ad000 R14: 0200 R15: Signed-off-by: Tong Zhang --- v2: fix typo and add console log according to Randy's comment drivers/video/fbdev/pm2fb.c | 29

[PATCH] video: fbdev: pm2fb: avoid stall on fb_sync

2021-02-20 Thread Tong Zhang
pm2fb_sync is called when doing /dev/fb read or write. The original pm2fb_sync wait indefinitely on hardware flags which can possibly stall kernel and make everything unresponsive. Instead of waiting indefinitely, we can timeout to give user a chance to get back control. Signed-off-by: Tong Zhang

[PATCH] scsi: arcmsr: catch bounds error earlier and dont panic

2021-02-18 Thread Tong Zhang
CR3: 0001029ca000 CR4: 06f0 [ 25.836940] DR0: DR1: DR2: [ 25.837333] DR3: DR6: fffe0ff0 DR7: 0400 Signed-off-by: Tong Zhang --- drivers/scsi/arcmsr/arcmsr_hba.c | 15 +++ 1 f

[PATCH] net: wan/lmc: dont print format string when not available

2021-02-15 Thread Tong Zhang
dev->name is determined only after calling register_hdlc_device(), however ,it is used by printk before the name is fully determined. [4.565137] hdlc%d: detected at e800, irq 11 Instead of printing out a %d, print hdlc directly Signed-off-by: Tong Zhang --- drivers/net/wan/

[PATCH] net: wan/lmc: unregister device when no matching device is found

2021-02-15 Thread Tong Zhang
349] == Signed-off-by: Tong Zhang --- drivers/net/wan/lmc/lmc_main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/wan/lmc/lmc_main.c b/drivers/net/wan/lmc/lmc_main.c index 93c7e8502845..ebb568f9bc66 100644 --- a/drivers/net/wan/lmc/lmc_main.c ++

[PATCH v1] atm: idt77252: fix build broken on amd64

2021-02-14 Thread Tong Zhang
runtime size check to buildtime size check in idt77252_init() Signed-off-by: Tong Zhang --- drivers/atm/idt77252.c | 11 +-- drivers/atm/idt77252.h | 2 +- include/linux/atmdev.h | 2 +- 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/drivers/atm/idt77252.c b/drivers/at

Re: [PATCH] enetc: auto select PHYLIB and MDIO_DEVRES

2021-02-11 Thread Tong Zhang
Thanks for the comments! I have sent a revised patch. - Tong On Thu, Feb 11, 2021 at 12:38 PM Florian Fainelli wrote: > > On 2/11/21 8:09 AM, Tong Zhang wrote: > > FSL_ENETC_MDIO use symbols from PHYLIB and MDIO_DEVRES, however they are > > not auto selected. >

[PATCH v2] enetc: auto select PHYLIB and MDIO_DEVRES

2021-02-11 Thread Tong Zhang
t/ethernet/freescale/enetc/fsl-enetc-mdio.ko] undefined! ERROR: modpost: "devm_mdiobus_alloc_size" [drivers/net/ethernet/freescale/enetc/fsl-enetc-mdio.ko] undefined! add depends on MDIO_DEVRES && MDIO_BUS Signed-off-by: Tong Zhang --- v2:change to depends on MDIO_DEVRES&&

[PATCH] enetc: auto select PHYLIB and MDIO_DEVRES

2021-02-11 Thread Tong Zhang
tc/fsl-enetc-mdio.ko] undefined! ERROR: modpost: "devm_mdiobus_alloc_size" [drivers/net/ethernet/freescale/enetc/fsl-enetc-mdio.ko] undefined! auto select MDIO_DEVRES and PHYLIB when FSL_ENETC_MDIO is selected. Signed-off-by: Tong Zhang --- drivers/net/ethernet/freescale/enetc/Kco

Re: [PATCH v1] x86/vdso: fix CE on non-compatible cflags

2021-02-10 Thread Tong Zhang
Hi Borislav, I am using ubuntu gcc, the x86-urgent branch works Thanks, - Tong On Wed, Feb 10, 2021 at 4:36 AM Borislav Petkov wrote: > > On Tue, Feb 09, 2021 at 07:07:49PM -0500, Tong Zhang wrote: > > I am getting some compilation error on when using CONFIG_X86_32 kernel >

[PATCH v1] media: ti-vpe: cal: fix ce

2021-02-09 Thread Tong Zhang
, __compiletime_assert_, __COUNTER__) redefine cal_read_field as a macro Signed-off-by: Tong Zhang --- drivers/media/platform/ti-vpe/cal.h | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/media/platform/ti-vpe/cal.h b/drivers/media/platform/ti-vpe/cal.h index

[PATCH v1] media: atomisp: fix compiler warning

2021-02-09 Thread Tong Zhang
from highmem %d, user ptr %p, cached %d\n", | ^~~ Signed-off-by: Tong Zhang --- drivers/staging/media/atomisp/pci/hmm/hmm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drive

[PATCH v1] media: atomisp add auto selection to prevent ce

2021-02-09 Thread Tong Zhang
pad, V4L2_SUBDEV_FORMAT_ACTIVE, add auto select VIDEO_V4L2_SUBDEV_API if VIDEO_ATOMISP is selected Signed-off-by: Tong Zhang --- drivers/staging/media/atomisp/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/media/atomisp/Kconfig b/drivers/staging/media/atomisp/Kconfig index 37577bb72

[PATCH v1] x86/vdso: fix CE on non-compatible cflags

2021-02-09 Thread Tong Zhang
I am getting some compilation error on when using CONFIG_X86_32 kernel configuration arch/x86/entry/vdso/vdso32/../vclock_gettime.c:29:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible add -fcf-protection=none when CONFIG_RETPOLINE=y Signed-off-by: Tong Zhang --- arch

Re: [PATCH] drm/qxl: properly handle device init failures

2021-02-09 Thread Tong Zhang
Hi Gerd, I tested the patch on drm-misc-next and it fixed the issue. Thanks, - Tong > On Feb 9, 2021, at 7:16 AM, Gerd Hoffmann wrote: > > On Mon, Feb 08, 2021 at 12:07:01PM -0500, Tong Zhang wrote: >> Does this patch fix an issue raised previously? Or should they be used >&g

Re: [PATCH] drm/qxl: properly handle device init failures

2021-02-08 Thread Tong Zhang
ically do not try release resources which where > not allocated in the first place. > > Cc: Tong Zhang > Signed-off-by: Gerd Hoffmann > --- > drivers/gpu/drm/qxl/qxl_display.c | 3 +++ > drivers/gpu/drm/qxl/qxl_kms.c | 4 > 2 files changed, 7 insertions(+) >

Re: [PATCH v2] drm/qxl: do not run release if qxl failed to init

2021-02-05 Thread Tong Zhang
On Feb 5, 2021, at 2:43 AM, Gerd Hoffmann wrote: > > On Thu, Feb 04, 2021 at 11:30:50AM -0500, Tong Zhang wrote: >> if qxl_device_init() fail, drm device will not be registered, >> in this case, do not run qxl_drm_release() > > How do you trigger this? > This c

Re: [PATCH v6 02/10] Revert "drm/qxl: do not run release if qxl failed to init"

2021-02-04 Thread Tong Zhang
> On Feb 4, 2021, at 2:06 PM, Thomas Zimmermann wrote: > > Hi Tong > >> I have posted an updated patch. >> The new patch use the following logic >> +if (!qdev->ddev.mode_config.funcs) >> + return; > > This is again just papering over the issue. Better don't call >

  1   2   >