lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 27 Jul 2009 14:10:24 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Mike Rapoport <mike@...pulab.co.il>
Cc:	joe@...ches.com, wim@...ana.be, linux-kernel@...r.kernel.org,
	denis@...pulab.co.il, mike@...pulab.co.il, pazke@...trinvest.ru
Subject: Re: [PATCH v2] add SBC-FITPC2 watchdog driver

On Tue, 21 Jul 2009 13:13:29 +0300
Mike Rapoport <mike@...pulab.co.il> wrote:

> > From: Denis Turischev <denis@...pulab.co.il>
> 
> This patch adds support for watchdog found on SBC-FITPC2 board.
> 
> +/*
> + * Watchdog driver for SBC-FITPC2 board
> + *
> + * Author: Denis Turischev <denis@...pulab.co.il>
> + *
> + * Adapted from the IXP2000 watchdog driver by Deepak Saxena.
> + *
> + * This file is licensed under  the terms of the GNU General Public
> + * License version 2. This program is licensed "as is" without any
> + * warranty of any kind, whether express or implied.
> + */
> +
> +#define pr_fmt(fmt) KBUILD_MODNAME " WATCHDOG: " fmt
> +
> +#include <linux/module.h>
> +#include <linux/types.h>
> +#include <linux/miscdevice.h>
> +#include <linux/watchdog.h>
> +#include <linux/ioport.h>
> +#include <linux/delay.h>
> +#include <linux/notifier.h>
> +#include <linux/fs.h>
> +#include <linux/reboot.h>
> +#include <linux/init.h>
> +#include <linux/moduleparam.h>
> +#include <linux/dmi.h>
> +
> +#include <linux/io.h>
> +#include <linux/uaccess.h>
> +#include <asm/system.h>
> +
> +static int nowayout = WATCHDOG_NOWAYOUT;
> +static unsigned int margin = 60;	/* (secs) Default is 1 minute */
> +static unsigned long wdt_status;
> +static spinlock_t wdt_lock;

You forgot to initialise the spinlock.

--- a/drivers/watchdog/sbc_fitpc2_wdt.c~watchdog-add-sbc-fitpc2-watchdog-driver-fix
+++ a/drivers/watchdog/sbc_fitpc2_wdt.c
@@ -32,7 +32,7 @@
 static int nowayout = WATCHDOG_NOWAYOUT;
 static unsigned int margin = 60;	/* (secs) Default is 1 minute */
 static unsigned long wdt_status;
-static spinlock_t wdt_lock;
+static DEFINE_SPINLOCK(wdt_lock);
 
 #define	WDT_IN_USE		0
 #define	WDT_OK_TO_CLOSE		1
_

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ