Message ID | 20150810213922.GA3380@mwanda |
---|---|
State | Not Applicable, archived |
Delegated to: | David Miller |
Headers | show |
On Mon, Aug 10, 2015 at 6:39 PM, Dan Carpenter <dan.carpenter@oracle.com> wrote: > If register_netdev() fails we return success but we should return an > error code instead. > > Reported-by: RUC_Soft_Sec <zy900702@163.com> > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> I have also sent a similar one: https://patchwork.ozlabs.org/patch/505758/ -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
From: Dan Carpenter <dan.carpenter@oracle.com> Date: Tue, 11 Aug 2015 00:39:22 +0300 > If register_netdev() fails we return success but we should return an > error code instead. > > Reported-by: RUC_Soft_Sec <zy900702@163.com> > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> I just applied another patch which fixes this earlier. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/net/hamradio/mkiss.c b/drivers/net/hamradio/mkiss.c index 2ffbf13..dcb6bb7 100644 --- a/drivers/net/hamradio/mkiss.c +++ b/drivers/net/hamradio/mkiss.c @@ -732,7 +732,8 @@ static int mkiss_open(struct tty_struct *tty) goto out_free_netdev; } - if (register_netdev(dev)) + err = register_netdev(dev); + if (err) goto out_free_buffers; /* after register_netdev() - because else printk smashes the kernel */
If register_netdev() fails we return success but we should return an error code instead. Reported-by: RUC_Soft_Sec <zy900702@163.com> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html