> From: Dinghao Liu
> Date: Fri, 24 Jul 2020 16:06:57 +0800
>
> > If req->ctype does not match any of NIX_AQ_CTYPE_CQ,
> > NIX_AQ_CTYPE_SQ or NIX_AQ_CTYPE_RQ, pointer bmap will remain
> > uninitialized and be accessed in test_bit(), which can lead
> > to kernal crash.
>
> This can never happen.
From: Dinghao Liu
Date: Fri, 24 Jul 2020 16:06:57 +0800
> If req->ctype does not match any of NIX_AQ_CTYPE_CQ,
> NIX_AQ_CTYPE_SQ or NIX_AQ_CTYPE_RQ, pointer bmap will remain
> uninitialized and be accessed in test_bit(), which can lead
> to kernal crash.
This can never happen.
> Fix this by ret
If req->ctype does not match any of NIX_AQ_CTYPE_CQ,
NIX_AQ_CTYPE_SQ or NIX_AQ_CTYPE_RQ, pointer bmap will remain
uninitialized and be accessed in test_bit(), which can lead
to kernal crash.
Fix this by returning an error code if this case is triggered.
Signed-off-by: Dinghao Liu
---
drivers/ne