aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorJonathan Corbet <corbet@lwn.net>2008-05-18 17:32:43 -0400
committerJonathan Corbet <corbet@lwn.net>2008-06-20 16:05:53 -0400
commitf2b9857eee17797541b845782ade4d7a9d50f843 (patch)
tree914a00afee2ff953199f99f7cf869e3fd83b36bd /drivers/net
parent0b2806768899dba5967bcd4a3b93eaed9a1dc4f3 (diff)
Add a bunch of cycle_kernel_lock() calls
All of the open() functions which don't need the BKL on their face may still depend on its acquisition to serialize opens against driver initialization. So make those functions acquire then release the BKL to be on the safe side. Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/ppp_generic.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ppp_generic.c b/drivers/net/ppp_generic.c
index dc8505062da7..83625fdff3dd 100644
--- a/drivers/net/ppp_generic.c
+++ b/drivers/net/ppp_generic.c
@@ -39,6 +39,7 @@
39#include <linux/if_arp.h> 39#include <linux/if_arp.h>
40#include <linux/ip.h> 40#include <linux/ip.h>
41#include <linux/tcp.h> 41#include <linux/tcp.h>
42#include <linux/smp_lock.h>
42#include <linux/spinlock.h> 43#include <linux/spinlock.h>
43#include <linux/rwsem.h> 44#include <linux/rwsem.h>
44#include <linux/stddef.h> 45#include <linux/stddef.h>
@@ -351,9 +352,9 @@ static const int npindex_to_ethertype[NUM_NP] = {
351 * Open instances of /dev/ppp can be in one of three states: 352 * Open instances of /dev/ppp can be in one of three states:
352 * unattached, attached to a ppp unit, or attached to a ppp channel. 353 * unattached, attached to a ppp unit, or attached to a ppp channel.
353 */ 354 */
354/* No BKL needed here */
355static int ppp_open(struct inode *inode, struct file *file) 355static int ppp_open(struct inode *inode, struct file *file)
356{ 356{
357 cycle_kernel_lock();
357 /* 358 /*
358 * This could (should?) be enforced by the permissions on /dev/ppp. 359 * This could (should?) be enforced by the permissions on /dev/ppp.
359 */ 360 */