From: "Steffen A. Mork" <linux-dev@morknet.de>
To: torvalds@osdl.org, Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Cc: linux-kernel@vger.kernel.org, trivial@rustcorp.com.au
Subject: Re: [PATCH] dss1_divert ISDN module compile fix for kernel 2.6.8.1
Date: Wed, 17 Nov 2004 22:14:09 +0100 [thread overview]
Message-ID: <419BBF21.9070305@morknet.de> (raw)
In-Reply-To: <58cb370e04111712074d85e17e@mail.gmail.com>
Dear Linus and Bartlomiej,
> Moreover, you must make sure that there is no other code (ie. in generic
> ISDN code) doing cli() stuff on objects that you are protecting by a spinlock
> etc., I've checked divert driver and it looks OK.
>
>
>>OK, thank you. I went into the copy/paste trap. I corrected the patch to
>>a global spinlock and tested it successfully.
>
>
> Great.
>
> Please do "interdiff" between the old and the new patch
> and send it to Linus (he has already merged the old patch).
the interdiff patch is appended to this mail and the link is:
http://ls7-www.cs.uni-dortmund.de/~mork/dss1_divert-patch1-2-patch2.diff
Signed-off-by: Steffen A. Mork <linux-dev@morknet.de>
> Thanks.
Thank you.
> Bartlomiej
Steffen
diff -uprN -X dontdiff linux-2.6.8.1-patch1/drivers/isdn/divert/divert_init.c linux-2.6.8.1-patch2/drivers/isdn/divert/divert_init.c
--- linux-2.6.8.1-patch1/drivers/isdn/divert/divert_init.c 2004-11-05 08:50:02.000000000 +0100
+++ linux-2.6.8.1-patch2/drivers/isdn/divert/divert_init.c 2004-11-17 17:50:38.000000000 +0100
@@ -62,7 +62,6 @@ static int __init divert_init(void)
static void __exit divert_exit(void)
{
unsigned long flags;
- spinlock_t divert_lock = SPIN_LOCK_UNLOCKED;
int i;
spin_lock_irqsave(&divert_lock, flags);
diff -uprN -X dontdiff linux-2.6.8.1-patch1/drivers/isdn/divert/divert_procfs.c linux-2.6.8.1-patch2/drivers/isdn/divert/divert_procfs.c
--- linux-2.6.8.1-patch1/drivers/isdn/divert/divert_procfs.c 2004-11-05 08:49:57.000000000 +0100
+++ linux-2.6.8.1-patch2/drivers/isdn/divert/divert_procfs.c 2004-11-17 17:42:00.000000000 +0100
@@ -182,7 +182,6 @@ isdn_divert_ioctl(struct inode *inode, s
divert_ioctl dioctl;
int i;
unsigned long flags;
- spinlock_t divert_lock = SPIN_LOCK_UNLOCKED;
divert_rule *rulep;
char *cp;
diff -uprN -X dontdiff linux-2.6.8.1-patch1/drivers/isdn/divert/isdn_divert.c linux-2.6.8.1-patch2/drivers/isdn/divert/isdn_divert.c
--- linux-2.6.8.1-patch1/drivers/isdn/divert/isdn_divert.c 2004-11-05 08:49:20.000000000 +0100
+++ linux-2.6.8.1-patch2/drivers/isdn/divert/isdn_divert.c 2004-11-17 19:39:32.000000000 +0100
@@ -48,13 +48,14 @@ static struct deflect_struc *table_head
static struct deflect_struc *table_tail = NULL;
static unsigned char extern_wait_max = 4; /* maximum wait in s for external process */
+spinlock_t divert_lock = SPIN_LOCK_UNLOCKED;
+
/***************************/
/* timer callback function */
/***************************/
static void deflect_timer_expire(ulong arg)
{
unsigned long flags;
- spinlock_t divert_lock = SPIN_LOCK_UNLOCKED;
struct call_struc *cs = (struct call_struc *) arg;
spin_lock_irqsave(&divert_lock, flags);
@@ -109,7 +110,6 @@ int cf_command(int drvid, int mode,
u_char proc, char *msn,
u_char service, char *fwd_nr, ulong *procid)
{ unsigned long flags;
- spinlock_t divert_lock = SPIN_LOCK_UNLOCKED;
int retval,msnlen;
int fwd_len;
char *p,*ielenp,tmp[60];
@@ -204,7 +204,6 @@ int deflect_extern_action(u_char cmd, ul
{ struct call_struc *cs;
isdn_ctrl ic;
unsigned long flags;
- spinlock_t divert_lock = SPIN_LOCK_UNLOCKED;
int i;
if ((cmd & 0x7F) > 2) return(-EINVAL); /* invalid command */
@@ -275,7 +274,6 @@ int deflect_extern_action(u_char cmd, ul
int insertrule(int idx, divert_rule *newrule)
{ struct deflect_struc *ds,*ds1=NULL;
unsigned long flags;
- spinlock_t divert_lock = SPIN_LOCK_UNLOCKED;
if (!(ds = (struct deflect_struc *) kmalloc(sizeof(struct deflect_struc),
GFP_KERNEL)))
@@ -321,7 +319,6 @@ int insertrule(int idx, divert_rule *new
int deleterule(int idx)
{ struct deflect_struc *ds,*ds1;
unsigned long flags;
- spinlock_t divert_lock = SPIN_LOCK_UNLOCKED;
if (idx < 0)
{ spin_lock_irqsave(&divert_lock, flags);
@@ -389,7 +386,6 @@ divert_rule *getruleptr(int idx)
int isdn_divert_icall(isdn_ctrl *ic)
{ int retval = 0;
unsigned long flags;
- spinlock_t divert_lock = SPIN_LOCK_UNLOCKED;
struct call_struc *cs = NULL;
struct deflect_struc *dv;
char *p,*p1;
@@ -540,7 +536,6 @@ int isdn_divert_icall(isdn_ctrl *ic)
void deleteprocs(void)
{ struct call_struc *cs, *cs1;
unsigned long flags;
- spinlock_t divert_lock = SPIN_LOCK_UNLOCKED;
spin_lock_irqsave(&divert_lock, flags);
cs = divert_head;
@@ -698,7 +693,6 @@ int prot_stat_callback(isdn_ctrl *ic)
{ struct call_struc *cs, *cs1;
int i;
unsigned long flags;
- spinlock_t divert_lock = SPIN_LOCK_UNLOCKED;
cs = divert_head; /* start of list */
cs1 = NULL;
@@ -790,7 +784,6 @@ int prot_stat_callback(isdn_ctrl *ic)
int isdn_divert_stat_callback(isdn_ctrl *ic)
{ struct call_struc *cs, *cs1;
unsigned long flags;
- spinlock_t divert_lock = SPIN_LOCK_UNLOCKED;
int retval;
retval = -1;
diff -uprN -X dontdiff linux-2.6.8.1-patch1/drivers/isdn/divert/isdn_divert.h linux-2.6.8.1-patch2/drivers/isdn/divert/isdn_divert.h
--- linux-2.6.8.1-patch1/drivers/isdn/divert/isdn_divert.h 2004-08-14 12:54:51.000000000 +0200
+++ linux-2.6.8.1-patch2/drivers/isdn/divert/isdn_divert.h 2004-11-17 18:59:16.000000000 +0100
@@ -114,6 +114,8 @@ struct divert_info
/**************/
/* Prototypes */
/**************/
+extern spinlock_t divert_lock;
+
extern ulong if_used; /* number of interface users */
extern int divert_dev_deinit(void);
extern int divert_dev_init(void);
next prev parent reply other threads:[~2004-11-17 21:18 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-17 14:54 [PATCH] dss1_divert ISDN module compile fix for kernel 2.6.8.1 Steffen A. Mork
2004-11-17 16:28 ` Bartlomiej Zolnierkiewicz
2004-11-17 16:55 ` Linus Torvalds
2004-11-17 18:52 ` Steffen A. Mork
2004-11-17 20:07 ` Bartlomiej Zolnierkiewicz
2004-11-17 21:14 ` Steffen A. Mork [this message]
2004-11-17 16:39 ` Jan Engelhardt
2004-11-17 22:43 ` [PATCH] " Tonnerre
2004-11-18 5:53 ` Steffen A. Mork
2004-11-18 5:57 ` Tonnerre
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=419BBF21.9070305@morknet.de \
--to=linux-dev@morknet.de \
--cc=bzolnier@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.org \
--cc=trivial@rustcorp.com.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox