aboutsummaryrefslogtreecommitdiffstats
path: root/net/can/bcm.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/can/bcm.c')
-rw-r--r--net/can/bcm.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/net/can/bcm.c b/net/can/bcm.c
index e8d58f33fe09..e32af52238a2 100644
--- a/net/can/bcm.c
+++ b/net/can/bcm.c
@@ -139,13 +139,13 @@ static char *bcm_proc_getifname(char *result, int ifindex)
139 if (!ifindex) 139 if (!ifindex)
140 return "any"; 140 return "any";
141 141
142 read_lock(&dev_base_lock); 142 rcu_read_lock();
143 dev = __dev_get_by_index(&init_net, ifindex); 143 dev = dev_get_by_index_rcu(&init_net, ifindex);
144 if (dev) 144 if (dev)
145 strcpy(result, dev->name); 145 strcpy(result, dev->name);
146 else 146 else
147 strcpy(result, "???"); 147 strcpy(result, "???");
148 read_unlock(&dev_base_lock); 148 rcu_read_unlock();
149 149
150 return result; 150 return result;
151} 151}
@@ -1539,7 +1539,7 @@ static int bcm_recvmsg(struct kiocb *iocb, struct socket *sock,
1539 return err; 1539 return err;
1540 } 1540 }
1541 1541
1542 sock_recv_timestamp(msg, sk, skb); 1542 sock_recv_ts_and_drops(msg, sk, skb);
1543 1543
1544 if (msg->msg_name) { 1544 if (msg->msg_name) {
1545 msg->msg_namelen = sizeof(struct sockaddr_can); 1545 msg->msg_namelen = sizeof(struct sockaddr_can);
@@ -1581,7 +1581,6 @@ static struct proto bcm_proto __read_mostly = {
1581static struct can_proto bcm_can_proto __read_mostly = { 1581static struct can_proto bcm_can_proto __read_mostly = {
1582 .type = SOCK_DGRAM, 1582 .type = SOCK_DGRAM,
1583 .protocol = CAN_BCM, 1583 .protocol = CAN_BCM,
1584 .capability = -1,
1585 .ops = &bcm_ops, 1584 .ops = &bcm_ops,
1586 .prot = &bcm_proto, 1585 .prot = &bcm_proto,
1587}; 1586};