All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH]: acpi sbs driver
@ 2006-09-05 15:49 Lebedev, Vladimir P
  2006-09-26  7:25 ` Len Brown
  0 siblings, 1 reply; 4+ messages in thread
From: Lebedev, Vladimir P @ 2006-09-05 15:49 UTC (permalink / raw)
  To: Brown, Len; +Cc: linux-acpi

[-- Attachment #1: Type: text/plain, Size: 47 bytes --]


Unchecked pointer dereference is fixed.



[-- Attachment #2: sbs_patch --]
[-- Type: application/octet-stream, Size: 760 bytes --]

Subject: fix unchecked pointer dereference

---
 drivers/acpi/sbs.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

Index: linux-2.6.18-rc5-default/drivers/acpi/sbs.c
===================================================================
--- linux-2.6.18-rc5-default.orig/drivers/acpi/sbs.c
+++ linux-2.6.18-rc5-default/drivers/acpi/sbs.c
@@ -1685,10 +1685,16 @@ static int acpi_sbs_add(struct acpi_devi
 
 int acpi_sbs_remove(struct acpi_device *device, int type)
 {
-	struct acpi_sbs *sbs = (struct acpi_sbs *)acpi_driver_data(device);
+	struct acpi_sbs *sbs = NULL;
 	int id;
 
-	if (!device || !sbs) {
+	if (!device) {
+		return -EINVAL;
+	}
+
+	sbs = (struct acpi_sbs *)acpi_driver_data(device);
+
+	if (!sbs) {
 		return -EINVAL;
 	}
 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH]: acpi sbs driver
@ 2006-09-05 15:59 Lebedev, Vladimir P
  2006-09-26  7:26 ` Len Brown
  0 siblings, 1 reply; 4+ messages in thread
From: Lebedev, Vladimir P @ 2006-09-05 15:59 UTC (permalink / raw)
  To: Brown, Len; +Cc: linux-acpi

[-- Attachment #1: Type: text/plain, Size: 43 bytes --]


Invalid module_param() call is fixed.


[-- Attachment #2: sbs_patch-2 --]
[-- Type: application/octet-stream, Size: 1057 bytes --]

Subject: Fix module_param() call arguments

---
 drivers/acpi/sbs.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

Index: linux-2.6.18-rc5-default/drivers/acpi/sbs.c
===================================================================
--- linux-2.6.18-rc5-default.orig/drivers/acpi/sbs.c
+++ linux-2.6.18-rc5-default/drivers/acpi/sbs.c
@@ -98,11 +98,11 @@ static int update_info_mode = UPDATE_INF
 static int update_time = UPDATE_TIME;
 static int update_time2 = UPDATE_TIME2;
 
-module_param(capacity_mode, int, CAPACITY_UNIT);
-module_param(update_mode, int, UPDATE_MODE);
-module_param(update_info_mode, int, UPDATE_INFO_MODE);
-module_param(update_time, int, UPDATE_TIME);
-module_param(update_time2, int, UPDATE_TIME2);
+module_param(capacity_mode, int, 0);
+module_param(update_mode, int, 0);
+module_param(update_info_mode, int, 0);
+module_param(update_time, int, 0);
+module_param(update_time2, int, 0);
 
 static int acpi_sbs_add(struct acpi_device *device);
 static int acpi_sbs_remove(struct acpi_device *device, int type);

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH]: acpi sbs driver
  2006-09-05 15:49 [PATCH]: acpi sbs driver Lebedev, Vladimir P
@ 2006-09-26  7:25 ` Len Brown
  0 siblings, 0 replies; 4+ messages in thread
From: Len Brown @ 2006-09-26  7:25 UTC (permalink / raw)
  To: Lebedev, Vladimir P; +Cc: linux-acpi

On Tuesday 05 September 2006 11:49, Lebedev, Vladimir P wrote:
> 
> Unchecked pointer dereference is fixed.

Applied.

thanks,
-Len

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH]: acpi sbs driver
  2006-09-05 15:59 Lebedev, Vladimir P
@ 2006-09-26  7:26 ` Len Brown
  0 siblings, 0 replies; 4+ messages in thread
From: Len Brown @ 2006-09-26  7:26 UTC (permalink / raw)
  To: Lebedev, Vladimir P; +Cc: linux-acpi

On Tuesday 05 September 2006 11:59, Lebedev, Vladimir P wrote:
> 
> Invalid module_param() call is fixed.

Applied.

thanks,
-Len

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-09-26  7:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-05 15:49 [PATCH]: acpi sbs driver Lebedev, Vladimir P
2006-09-26  7:25 ` Len Brown
  -- strict thread matches above, loose matches on Subject: below --
2006-09-05 15:59 Lebedev, Vladimir P
2006-09-26  7:26 ` Len Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.