| 1 | \ 1\ 1\ 1\ 1 |
| 2 | Received: from louie.udel.edu by huey.udel.edu id aa25712; 15 Feb 94 17:54 EST |
| 3 | Received: from faui45.informatik.uni-erlangen.de by louie.udel.edu id aa18345; |
| 4 | 15 Feb 94 17:51 EST |
| 5 | Received: from faui43.informatik.uni-erlangen.de by uni-erlangen.de with SMTP; |
| 6 | id AA15109 (5.65c-6/7.3v-FAU); Tue, 15 Feb 1994 23:50:53 +0100 |
| 7 | Received: from faui45x.informatik.uni-erlangen.de by immd4.informatik.uni-erlangen.de with SMTP; |
| 8 | id AA17375 (5.65c-6/7.3m-FAU); Tue, 15 Feb 1994 23:50:51 +0100 |
| 9 | From: Frank Kardel <Frank.Kardel@informatik.uni-erlangen.de> |
| 10 | Message-Id: <199402152250.AA17375@faui43.informatik.uni-erlangen.de> |
| 11 | Subject: fixed for parse kernel stuff... |
| 12 | To: mills@udel.edu |
| 13 | Date: Tue, 15 Feb 94 23:50:47 MET |
| 14 | X-Mailer: ELM [version 2.3 PL11] |
| 15 | |
| 16 | |
| 17 | Hi, Dave ! |
| 18 | |
| 19 | Here are some fixes for the PARSE kernel modules. Basically they |
| 20 | fix a memory leak on an open error condition and pronounce the |
| 21 | Solaris 2.x stream module MT safe. |
| 22 | |
| 23 | Well, actually I should put something for you to eat here 8-). |
| 24 | |
| 25 | RCS file: /src/NTP/REPOSITORY/v3/parse/parsesolaris.c,v |
| 26 | retrieving revision 1.1.1.7 |
| 27 | diff -c -r1.1.1.7 parsesolaris.c |
| 28 | *** parse/parsesolaris.c:1.1.1.7 1994/02/12 09:53:42 |
| 29 | --- parse/parsesolaris.c 1994/02/15 22:20:51 |
| 30 | *************** |
| 31 | *** 1,7 **** |
| 32 | /* |
| 33 | ! * /src/NTP/REPOSITORY/v3/parse/parsesolaris.c,v 3.12 1994/02/02 17:45:35 kardel Exp |
| 34 | * |
| 35 | ! * parsesolaris.c,v 3.12 1994/02/02 17:45:35 kardel Exp |
| 36 | * |
| 37 | * STREAMS module for reference clocks |
| 38 | * (SunOS5.x - not fully tested - buyer beware ! - OS KILLERS may still be |
| 39 | --- 1,7 ---- |
| 40 | /* |
| 41 | ! * /src/NTP/REPOSITORY/v3/parse/parsesolaris.c,v 3.15 1994/02/15 22:20:51 kardel Exp |
| 42 | * |
| 43 | ! * parsesolaris.c,v 3.15 1994/02/15 22:20:51 kardel Exp |
| 44 | * |
| 45 | * STREAMS module for reference clocks |
| 46 | * (SunOS5.x - not fully tested - buyer beware ! - OS KILLERS may still be |
| 47 | *************** |
| 48 | *** 19,25 **** |
| 49 | */ |
| 50 | |
| 51 | #ifndef lint |
| 52 | ! static char rcsid[] = "parsesolaris.c,v 3.9 1994/01/25 19:05:26 kardel Exp"; |
| 53 | #endif |
| 54 | |
| 55 | /* |
| 56 | --- 19,25 ---- |
| 57 | */ |
| 58 | |
| 59 | #ifndef lint |
| 60 | ! static char rcsid[] = "parsesolaris.c,v 3.15 1994/02/15 22:20:51 kardel Exp"; |
| 61 | #endif |
| 62 | |
| 63 | /* |
| 64 | *************** |
| 65 | *** 65,71 **** |
| 66 | { |
| 67 | "parse", /* module name */ |
| 68 | &parseinfo, /* module information */ |
| 69 | ! D_NEW, /* not clean yet */ |
| 70 | /* lock ptr */ |
| 71 | }; |
| 72 | |
| 73 | --- 65,71 ---- |
| 74 | { |
| 75 | "parse", /* module name */ |
| 76 | &parseinfo, /* module information */ |
| 77 | ! D_NEW|D_MP|D_MTQPAIR, /* exclusive for q pair */ |
| 78 | /* lock ptr */ |
| 79 | }; |
| 80 | |
| 81 | *************** |
| 82 | *** 139,145 **** |
| 83 | /*ARGSUSED*/ |
| 84 | int _init(void) |
| 85 | { |
| 86 | ! static char revision[] = "3.12"; |
| 87 | char *s, *S, *t; |
| 88 | |
| 89 | /* |
| 90 | --- 139,145 ---- |
| 91 | /*ARGSUSED*/ |
| 92 | int _init(void) |
| 93 | { |
| 94 | ! static char revision[] = "3.15"; |
| 95 | char *s, *S, *t; |
| 96 | |
| 97 | /* |
| 98 | *************** |
| 99 | *** 413,418 **** |
| 100 | --- 413,420 ---- |
| 101 | parse->parse_ppsclockev.tv.tv_usec = 0; |
| 102 | parse->parse_ppsclockev.serial = 0; |
| 103 | |
| 104 | + qprocson(q); |
| 105 | + |
| 106 | parseprintf(DD_OPEN,("parse: OPEN - initializing io subsystem q=%x\n", q)); |
| 107 | |
| 108 | if (!parse_ioinit(&parse->parse_io)) |
| 109 | *************** |
| 110 | *** 420,425 **** |
| 111 | --- 422,429 ---- |
| 112 | /* |
| 113 | * ok guys - beat it |
| 114 | */ |
| 115 | + qprocsoff(q); |
| 116 | + |
| 117 | kmem_free((caddr_t)parse, sizeof(parsestream_t)); |
| 118 | |
| 119 | parsebusy--; |
| 120 | *************** |
| 121 | *** 441,447 **** |
| 122 | */ |
| 123 | if (!notice) |
| 124 | { |
| 125 | ! printf("%s: Copyright (c) 1991-1993, Frank Kardel\n", modlstrmod.strmod_linkinfo); |
| 126 | notice = 1; |
| 127 | } |
| 128 | |
| 129 | --- 445,451 ---- |
| 130 | */ |
| 131 | if (!notice) |
| 132 | { |
| 133 | ! printf("%s: Copyright (c) 1991-1994, Frank Kardel\n", modlstrmod.strmod_linkinfo); |
| 134 | notice = 1; |
| 135 | } |
| 136 | |
| 137 | *************** |
| 138 | *** 449,455 **** |
| 139 | --- 453,464 ---- |
| 140 | } |
| 141 | else |
| 142 | { |
| 143 | + qprocsoff(q); |
| 144 | + |
| 145 | + kmem_free((caddr_t)parse, sizeof(parsestream_t)); |
| 146 | + |
| 147 | parsebusy--; |
| 148 | + |
| 149 | return EIO; |
| 150 | } |
| 151 | } |
| 152 | *************** |
| 153 | *** 462,467 **** |
| 154 | --- 471,478 ---- |
| 155 | |
| 156 | parseprintf(DD_CLOSE,("parse: CLOSE\n")); |
| 157 | |
| 158 | + qprocsoff(q); |
| 159 | + |
| 160 | s = splhigh(); |
| 161 | |
| 162 | if (parse->parse_dqueue) |
| 163 | *************** |
| 164 | *** 1178,1184 **** |
| 165 | /* |
| 166 | * History: |
| 167 | * |
| 168 | ! * parsesolaris.c,v |
| 169 | * Revision 3.12 1994/02/02 17:45:35 kardel |
| 170 | * rcs ids fixed |
| 171 | * |
| 172 | --- 1189,1204 ---- |
| 173 | /* |
| 174 | * History: |
| 175 | * |
| 176 | ! * parsesolaris.c,v |
| 177 | ! * Revision 3.15 1994/02/15 22:20:51 kardel |
| 178 | ! * rcsid fixed |
| 179 | ! * |
| 180 | ! * Revision 3.14 1994/02/15 22:06:04 kardel |
| 181 | ! * added qprocsx & flags for MT capability |
| 182 | ! * |
| 183 | ! * Revision 3.13 1994/02/13 19:16:47 kardel |
| 184 | ! * updated verbose Copyright message |
| 185 | ! * |
| 186 | * Revision 3.12 1994/02/02 17:45:35 kardel |
| 187 | * rcs ids fixed |
| 188 | * |
| 189 | RCS file: /src/NTP/REPOSITORY/v3/parse/parsestreams.c,v |
| 190 | retrieving revision 1.1.1.8 |
| 191 | diff -c -r1.1.1.8 parsestreams.c |
| 192 | *** parse/parsestreams.c:1.1.1.8 1994/02/12 09:53:45 |
| 193 | --- parse/parsestreams.c 1994/02/15 22:39:50 |
| 194 | *************** |
| 195 | *** 1,7 **** |
| 196 | /* |
| 197 | ! * /src/NTP/REPOSITORY/v3/parse/parsestreams.c,v 3.14 1994/02/02 17:45:38 kardel Exp |
| 198 | * |
| 199 | ! * parsestreams.c,v 3.14 1994/02/02 17:45:38 kardel Exp |
| 200 | * |
| 201 | * STREAMS module for reference clocks |
| 202 | * (SunOS4.x) |
| 203 | --- 1,7 ---- |
| 204 | /* |
| 205 | ! * /src/NTP/REPOSITORY/v3/parse/parsestreams.c,v 3.16 1994/02/15 22:39:50 kardel Exp |
| 206 | * |
| 207 | ! * parsestreams.c,v 3.16 1994/02/15 22:39:50 kardel Exp |
| 208 | * |
| 209 | * STREAMS module for reference clocks |
| 210 | * (SunOS4.x) |
| 211 | *************** |
| 212 | *** 527,533 **** |
| 213 | */ |
| 214 | if (!notice) |
| 215 | { |
| 216 | ! printf("%s: Copyright (c) 1991-1993, Frank Kardel\n", parsesync_vd.Drv_name); |
| 217 | notice = 1; |
| 218 | } |
| 219 | |
| 220 | --- 527,533 ---- |
| 221 | */ |
| 222 | if (!notice) |
| 223 | { |
| 224 | ! printf("%s: Copyright (c) 1991-1994, Frank Kardel\n", parsesync_vd.Drv_name); |
| 225 | notice = 1; |
| 226 | } |
| 227 | |
| 228 | *************** |
| 229 | *** 535,540 **** |
| 230 | --- 535,542 ---- |
| 231 | } |
| 232 | else |
| 233 | { |
| 234 | + kmem_free((caddr_t)parse, sizeof(parsestream_t)); |
| 235 | + |
| 236 | #ifdef VDDRV |
| 237 | parsebusy--; |
| 238 | #endif |
| 239 | *************** |
| 240 | *** 1257,1263 **** |
| 241 | /* |
| 242 | * History: |
| 243 | * |
| 244 | ! * parsestreams.c,v |
| 245 | * Revision 3.14 1994/02/02 17:45:38 kardel |
| 246 | * rcs ids fixed |
| 247 | * |
| 248 | --- 1259,1271 ---- |
| 249 | /* |
| 250 | * History: |
| 251 | * |
| 252 | ! * parsestreams.c,v |
| 253 | ! * Revision 3.16 1994/02/15 22:39:50 kardel |
| 254 | ! * memory leak on open failure closed |
| 255 | ! * |
| 256 | ! * Revision 3.15 1994/02/13 19:16:50 kardel |
| 257 | ! * updated verbose Copyright message |
| 258 | ! * |
| 259 | * Revision 3.14 1994/02/02 17:45:38 kardel |
| 260 | * rcs ids fixed |
| 261 | * |
| 262 | |
| 263 | -- |
| 264 | Frank Kardel (kardel@informatik.uni-erlangen.de) |
| 265 | All SCSI disks will from now on be required to send an email |
| 266 | notice 24 hours prior to complete hardware failure! |
| 267 | \ 1\ 1\ 1\ 1 |