* [PATCH net] ionic: Fix an error code in ionic_lif_alloc()
@ 2019-09-21 5:59 Dan Carpenter
2019-09-22 18:21 ` Shannon Nelson
2019-09-22 21:17 ` Jakub Kicinski
0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2019-09-21 5:59 UTC (permalink / raw)
To: Shannon Nelson; +Cc: Pensando Drivers, David S. Miller, netdev, kernel-janitors
We need to set the error code on this path. Otherwise it probably
results in a NULL dereference down the line.
Fixes: aa3198819bea ("ionic: Add RSS support")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
drivers/net/ethernet/pensando/ionic/ionic_lif.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/pensando/ionic/ionic_lif.c b/drivers/net/ethernet/pensando/ionic/ionic_lif.c
index db7c82742828..72107a0627a9 100644
--- a/drivers/net/ethernet/pensando/ionic/ionic_lif.c
+++ b/drivers/net/ethernet/pensando/ionic/ionic_lif.c
@@ -1704,6 +1704,7 @@ static struct ionic_lif *ionic_lif_alloc(struct ionic *ionic, unsigned int index
GFP_KERNEL);
if (!lif->rss_ind_tbl) {
+ err = -ENOMEM;
dev_err(dev, "Failed to allocate rss indirection table, aborting\n");
goto err_out_free_qcqs;
}
--
2.20.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net] ionic: Fix an error code in ionic_lif_alloc()
2019-09-21 5:59 [PATCH net] ionic: Fix an error code in ionic_lif_alloc() Dan Carpenter
@ 2019-09-22 18:21 ` Shannon Nelson
2019-09-22 21:17 ` Jakub Kicinski
1 sibling, 0 replies; 3+ messages in thread
From: Shannon Nelson @ 2019-09-22 18:21 UTC (permalink / raw)
To: Dan Carpenter; +Cc: Pensando Drivers, David S. Miller, netdev, kernel-janitors
On 9/20/19 10:59 PM, Dan Carpenter wrote:
> We need to set the error code on this path. Otherwise it probably
> results in a NULL dereference down the line.
>
> Fixes: aa3198819bea ("ionic: Add RSS support")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> ---
> drivers/net/ethernet/pensando/ionic/ionic_lif.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/net/ethernet/pensando/ionic/ionic_lif.c b/drivers/net/ethernet/pensando/ionic/ionic_lif.c
> index db7c82742828..72107a0627a9 100644
> --- a/drivers/net/ethernet/pensando/ionic/ionic_lif.c
> +++ b/drivers/net/ethernet/pensando/ionic/ionic_lif.c
> @@ -1704,6 +1704,7 @@ static struct ionic_lif *ionic_lif_alloc(struct ionic *ionic, unsigned int index
> GFP_KERNEL);
>
> if (!lif->rss_ind_tbl) {
> + err = -ENOMEM;
> dev_err(dev, "Failed to allocate rss indirection table, aborting\n");
> goto err_out_free_qcqs;
> }
Thanks, Dan.
Acked-by: Shannon Nelson <snelson@pensando.io>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net] ionic: Fix an error code in ionic_lif_alloc()
2019-09-21 5:59 [PATCH net] ionic: Fix an error code in ionic_lif_alloc() Dan Carpenter
2019-09-22 18:21 ` Shannon Nelson
@ 2019-09-22 21:17 ` Jakub Kicinski
1 sibling, 0 replies; 3+ messages in thread
From: Jakub Kicinski @ 2019-09-22 21:17 UTC (permalink / raw)
To: Dan Carpenter
Cc: Shannon Nelson, Pensando Drivers, David S. Miller, netdev,
kernel-janitors
On Sat, 21 Sep 2019 08:59:26 +0300, Dan Carpenter wrote:
> We need to set the error code on this path. Otherwise it probably
> results in a NULL dereference down the line.
>
> Fixes: aa3198819bea ("ionic: Add RSS support")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Applied, thank you!
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-09-22 22:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-21 5:59 [PATCH net] ionic: Fix an error code in ionic_lif_alloc() Dan Carpenter
2019-09-22 18:21 ` Shannon Nelson
2019-09-22 21:17 ` Jakub Kicinski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).