/[linux-patches]/genpatches-2.6/trunk/2.6.14/1705_irda-locking-fix.patch
Gentoo

Contents of /genpatches-2.6/trunk/2.6.14/1705_irda-locking-fix.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 292 - (show annotations) (download) (as text)
Tue Jan 31 21:50:53 2006 UTC (14 years, 9 months ago) by johnm
File MIME type: text/x-diff
File size: 1830 byte(s)
Large update - thanks goes to Kerin Millar for the legwork.
1 From: Andrew Morton <akpm@osdl.org>
2 Date: Tue, 8 Nov 2005 17:41:13 +0000 (-0800)
3 Subject: [IRDA] donauboe: locking fix
4 X-Git-Tag: v2.6.15-rc1
5 X-Git-Url: http://kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=ac7c98eca88a854755475fcfe1b2bf5f97f90d99
6
7 [IRDA] donauboe: locking fix
8
9 From: Andrew Morton <akpm@osdl.org>
10
11 Two missing unlocks, as noted by Ted Unangst <tedu@coverity.com>
12
13 Signed-off-by: Andrew Morton <akpm@osdl.org>
14 Signed-off-by: David S. Miller <davem@davemloft.net>
15 ---
16
17 --- a/drivers/net/irda/donauboe.c
18 +++ b/drivers/net/irda/donauboe.c
19 @@ -1459,8 +1459,10 @@ toshoboe_net_ioctl (struct net_device *d
20 */
21 IRDA_DEBUG (1, "%s(BANDWIDTH), %s, (%X/%ld\n", __FUNCTION__
22 ,dev->name, INB (OBOE_STATUS), irq->ifr_baudrate );
23 - if (!in_interrupt () && !capable (CAP_NET_ADMIN))
24 - return -EPERM;
25 + if (!in_interrupt () && !capable (CAP_NET_ADMIN)) {
26 + ret = -EPERM;
27 + goto out;
28 + }
29
30 /* self->speed=irq->ifr_baudrate; */
31 /* toshoboe_setbaud(self); */
32 @@ -1470,8 +1472,10 @@ toshoboe_net_ioctl (struct net_device *d
33 case SIOCSMEDIABUSY: /* Set media busy */
34 IRDA_DEBUG (1, "%s(MEDIABUSY), %s, (%X/%x)\n", __FUNCTION__
35 ,dev->name, INB (OBOE_STATUS), capable (CAP_NET_ADMIN) );
36 - if (!capable (CAP_NET_ADMIN))
37 - return -EPERM;
38 + if (!capable (CAP_NET_ADMIN)) {
39 + ret = -EPERM;
40 + goto out;
41 + }
42 irda_device_set_media_busy (self->netdev, TRUE);
43 break;
44 case SIOCGRECEIVING: /* Check if we are receiving right now */
45 @@ -1483,7 +1487,7 @@ toshoboe_net_ioctl (struct net_device *d
46 IRDA_DEBUG (1, "%s(?), %s, (cmd=0x%X)\n", __FUNCTION__, dev->name, cmd);
47 ret = -EOPNOTSUPP;
48 }
49 -
50 +out:
51 spin_unlock_irqrestore(&self->spinlock, flags);
52 return ret;
53

  ViewVC Help
Powered by ViewVC 1.1.20