Re: [PATCH] iommu/mediatek: fix NULL pointer dereference when printing dev_name

2022-04-24 Thread Miles Chen via iommu
>Hi Miles, > >Thank you for the patch! Perhaps something to improve: > >[auto build test WARNING on joro-iommu/next] >[also build test WARNING on v5.18-rc3 next-20220422] >[If your patch is applied to the wrong git tree, kindly drop us a note. >And when submitting patch, we suggest to use '--base'

Re: [PATCH] iommu/mediatek: fix NULL pointer dereference when printing dev_name

2022-04-22 Thread kernel test robot
Hi Miles, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on joro-iommu/next] [also build test WARNING on v5.18-rc3 next-20220422] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as docum

[PATCH] iommu/mediatek: fix NULL pointer dereference when printing dev_name

2022-04-22 Thread Miles Chen via iommu
When larbdev is NULL (in the case I hit, the node is incorrectly set iommus = <&iommu NUM>), it will cause device_link_add() fail and the kernel crashes when we try to print dev_name(larbdev). Fix it by adding a NULL pointer check before device_link_add/device_link_remove. It should work for norm