Re: [PATCH] Staging: rtl8192e: Fix potential NULL pointer dereference
On Wed, Jul 02, 2014 at 07:26:20PM +0200, Emil Goode wrote: > Hello Greg, > > On Wed, Jul 02, 2014 at 09:33:34AM -0700, Greg Kroah-Hartman wrote: > > On Wed, Jul 02, 2014 at 11:25:51AM +0200, Emil Goode wrote: > > > We need to make sure the struct rtllib_device pointer ieee is not NULL > > > after the goto rx_dropped label since it is dereferenced there. > > > > > > Signed-off-by: Emil Goode > > > --- > > > drivers/staging/rtl8192e/rtllib_rx.c |3 ++- > > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > > > diff --git a/drivers/staging/rtl8192e/rtllib_rx.c > > > b/drivers/staging/rtl8192e/rtllib_rx.c > > > index 60de54c..7db3e74 100644 > > > --- a/drivers/staging/rtl8192e/rtllib_rx.c > > > +++ b/drivers/staging/rtl8192e/rtllib_rx.c > > > @@ -1496,7 +1496,8 @@ int rtllib_rx(struct rtllib_device *ieee, struct > > > sk_buff *skb, > > > return ret; > > > > > > rx_dropped: > > > - ieee->stats.rx_dropped++; > > > + if (ieee) > > > + ieee->stats.rx_dropped++; > > > return 0; > > > } > > > EXPORT_SYMBOL(rtllib_rx); > > > > Is this something that is hitting users today in the tree, or is this > > just a bug you found looking at the code? > > It's a static checker fix and I'm not aware of any impact on users. > If you want I will resend with that information added? No, that's fine, just trying to see which kernel to apply this to... thanks, greg k-h -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] Staging: rtl8192e: Fix potential NULL pointer dereference
Hello Greg, On Wed, Jul 02, 2014 at 09:33:34AM -0700, Greg Kroah-Hartman wrote: > On Wed, Jul 02, 2014 at 11:25:51AM +0200, Emil Goode wrote: > > We need to make sure the struct rtllib_device pointer ieee is not NULL > > after the goto rx_dropped label since it is dereferenced there. > > > > Signed-off-by: Emil Goode > > --- > > drivers/staging/rtl8192e/rtllib_rx.c |3 ++- > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/staging/rtl8192e/rtllib_rx.c > > b/drivers/staging/rtl8192e/rtllib_rx.c > > index 60de54c..7db3e74 100644 > > --- a/drivers/staging/rtl8192e/rtllib_rx.c > > +++ b/drivers/staging/rtl8192e/rtllib_rx.c > > @@ -1496,7 +1496,8 @@ int rtllib_rx(struct rtllib_device *ieee, struct > > sk_buff *skb, > > return ret; > > > > rx_dropped: > > - ieee->stats.rx_dropped++; > > + if (ieee) > > + ieee->stats.rx_dropped++; > > return 0; > > } > > EXPORT_SYMBOL(rtllib_rx); > > Is this something that is hitting users today in the tree, or is this > just a bug you found looking at the code? It's a static checker fix and I'm not aware of any impact on users. If you want I will resend with that information added? Best regards, Emil Goode -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] Staging: rtl8192e: Fix potential NULL pointer dereference
On Wed, Jul 02, 2014 at 11:25:51AM +0200, Emil Goode wrote: > We need to make sure the struct rtllib_device pointer ieee is not NULL > after the goto rx_dropped label since it is dereferenced there. > > Signed-off-by: Emil Goode > --- > drivers/staging/rtl8192e/rtllib_rx.c |3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/staging/rtl8192e/rtllib_rx.c > b/drivers/staging/rtl8192e/rtllib_rx.c > index 60de54c..7db3e74 100644 > --- a/drivers/staging/rtl8192e/rtllib_rx.c > +++ b/drivers/staging/rtl8192e/rtllib_rx.c > @@ -1496,7 +1496,8 @@ int rtllib_rx(struct rtllib_device *ieee, struct > sk_buff *skb, > return ret; > > rx_dropped: > - ieee->stats.rx_dropped++; > + if (ieee) > + ieee->stats.rx_dropped++; > return 0; > } > EXPORT_SYMBOL(rtllib_rx); Is this something that is hitting users today in the tree, or is this just a bug you found looking at the code? thanks, greg k-h -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] Staging: rtl8192e: Fix potential NULL pointer dereference
We need to make sure the struct rtllib_device pointer ieee is not NULL after the goto rx_dropped label since it is dereferenced there. Signed-off-by: Emil Goode --- drivers/staging/rtl8192e/rtllib_rx.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c index 60de54c..7db3e74 100644 --- a/drivers/staging/rtl8192e/rtllib_rx.c +++ b/drivers/staging/rtl8192e/rtllib_rx.c @@ -1496,7 +1496,8 @@ int rtllib_rx(struct rtllib_device *ieee, struct sk_buff *skb, return ret; rx_dropped: - ieee->stats.rx_dropped++; + if (ieee) + ieee->stats.rx_dropped++; return 0; } EXPORT_SYMBOL(rtllib_rx); -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] Staging: rtl8192e: Fix potential NULL pointer dereference
We need to make sure the struct rtllib_device pointer ieee is not NULL after the goto rx_dropped label since it is dereferenced there. Signed-off-by: Emil Goode emilgo...@gmail.com --- drivers/staging/rtl8192e/rtllib_rx.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c index 60de54c..7db3e74 100644 --- a/drivers/staging/rtl8192e/rtllib_rx.c +++ b/drivers/staging/rtl8192e/rtllib_rx.c @@ -1496,7 +1496,8 @@ int rtllib_rx(struct rtllib_device *ieee, struct sk_buff *skb, return ret; rx_dropped: - ieee-stats.rx_dropped++; + if (ieee) + ieee-stats.rx_dropped++; return 0; } EXPORT_SYMBOL(rtllib_rx); -- 1.7.10.4 -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] Staging: rtl8192e: Fix potential NULL pointer dereference
On Wed, Jul 02, 2014 at 11:25:51AM +0200, Emil Goode wrote: We need to make sure the struct rtllib_device pointer ieee is not NULL after the goto rx_dropped label since it is dereferenced there. Signed-off-by: Emil Goode emilgo...@gmail.com --- drivers/staging/rtl8192e/rtllib_rx.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c index 60de54c..7db3e74 100644 --- a/drivers/staging/rtl8192e/rtllib_rx.c +++ b/drivers/staging/rtl8192e/rtllib_rx.c @@ -1496,7 +1496,8 @@ int rtllib_rx(struct rtllib_device *ieee, struct sk_buff *skb, return ret; rx_dropped: - ieee-stats.rx_dropped++; + if (ieee) + ieee-stats.rx_dropped++; return 0; } EXPORT_SYMBOL(rtllib_rx); Is this something that is hitting users today in the tree, or is this just a bug you found looking at the code? thanks, greg k-h -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] Staging: rtl8192e: Fix potential NULL pointer dereference
Hello Greg, On Wed, Jul 02, 2014 at 09:33:34AM -0700, Greg Kroah-Hartman wrote: On Wed, Jul 02, 2014 at 11:25:51AM +0200, Emil Goode wrote: We need to make sure the struct rtllib_device pointer ieee is not NULL after the goto rx_dropped label since it is dereferenced there. Signed-off-by: Emil Goode emilgo...@gmail.com --- drivers/staging/rtl8192e/rtllib_rx.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c index 60de54c..7db3e74 100644 --- a/drivers/staging/rtl8192e/rtllib_rx.c +++ b/drivers/staging/rtl8192e/rtllib_rx.c @@ -1496,7 +1496,8 @@ int rtllib_rx(struct rtllib_device *ieee, struct sk_buff *skb, return ret; rx_dropped: - ieee-stats.rx_dropped++; + if (ieee) + ieee-stats.rx_dropped++; return 0; } EXPORT_SYMBOL(rtllib_rx); Is this something that is hitting users today in the tree, or is this just a bug you found looking at the code? It's a static checker fix and I'm not aware of any impact on users. If you want I will resend with that information added? Best regards, Emil Goode -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] Staging: rtl8192e: Fix potential NULL pointer dereference
On Wed, Jul 02, 2014 at 07:26:20PM +0200, Emil Goode wrote: Hello Greg, On Wed, Jul 02, 2014 at 09:33:34AM -0700, Greg Kroah-Hartman wrote: On Wed, Jul 02, 2014 at 11:25:51AM +0200, Emil Goode wrote: We need to make sure the struct rtllib_device pointer ieee is not NULL after the goto rx_dropped label since it is dereferenced there. Signed-off-by: Emil Goode emilgo...@gmail.com --- drivers/staging/rtl8192e/rtllib_rx.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c index 60de54c..7db3e74 100644 --- a/drivers/staging/rtl8192e/rtllib_rx.c +++ b/drivers/staging/rtl8192e/rtllib_rx.c @@ -1496,7 +1496,8 @@ int rtllib_rx(struct rtllib_device *ieee, struct sk_buff *skb, return ret; rx_dropped: - ieee-stats.rx_dropped++; + if (ieee) + ieee-stats.rx_dropped++; return 0; } EXPORT_SYMBOL(rtllib_rx); Is this something that is hitting users today in the tree, or is this just a bug you found looking at the code? It's a static checker fix and I'm not aware of any impact on users. If you want I will resend with that information added? No, that's fine, just trying to see which kernel to apply this to... thanks, greg k-h -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/