Re: [PATCH] iwlwifi: fix a potential NULL pointer dereference

2019-09-19 Thread Allen
+ trans_pcie->rba.alloc_wq = alloc_workqueue("rb_allocator", + WQ_HIGHPRI | WQ_UNBOUND, 1); + if (!trans_pcie->rba.alloc_wq) { I would like to stick to if(unlikely(!trans_pcie->rba.alloc_wq) just for consistency. That's just

Re: [PATCH] iwlwifi: fix a potential NULL pointer dereference

2019-09-19 Thread Johannes Berg
On Thu, 2019-09-19 at 19:37 +0530, Allen wrote: > > > > + trans_pcie->rba.alloc_wq = alloc_workqueue("rb_allocator", > > + WQ_HIGHPRI | WQ_UNBOUND, 1); > > + if (!trans_pcie->rba.alloc_wq) { > >I would like to stick to if(unlikely(!trans_pcie->

Re: [PATCH] iwlwifi: fix a potential NULL pointer dereference

2019-09-19 Thread Allen
Anyway, as 0-day bot pointed out, this isn't really right. The cleanup paths here are also tricky, so I arrived at this patch a few days ago: My bad, I should have looked at the cleanup path. diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c b/drivers/net/wireless/intel/iwlw

Re: [PATCH] iwlwifi: fix a potential NULL pointer dereference

2019-09-19 Thread Johannes Berg
On Wed, 2019-09-18 at 23:41 +0530, Allen Pais wrote: > alloc_workqueue is not checked for errors and as a result, > a potential NULL dereference could occur. Wonder why this is coming out now ... but I don't think kmalloc() was ever 'fixed' to fail for small allocations, so I guess this will never

Re: [PATCH] iwlwifi: fix a potential NULL pointer dereference

2019-09-18 Thread kbuild test robot
Hi Allen, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on linus/master] [cannot apply to v5.3 next-20190917] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Al

[PATCH] iwlwifi: fix a potential NULL pointer dereference

2019-09-18 Thread Allen Pais
alloc_workqueue is not checked for errors and as a result, a potential NULL dereference could occur. Signed-off-by: Allen Pais --- drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c b/drivers/n