diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/connector/connector.c | 2 | ||||
-rw-r--r-- | drivers/scsi/scsi_netlink.c | 2 | ||||
-rw-r--r-- | drivers/scsi/scsi_transport_iscsi.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/drivers/connector/connector.c b/drivers/connector/connector.c index a905f7820331..7f9c4fb7e5b0 100644 --- a/drivers/connector/connector.c +++ b/drivers/connector/connector.c | |||
@@ -212,7 +212,7 @@ static void cn_rx_skb(struct sk_buff *__skb) | |||
212 | skb = skb_get(__skb); | 212 | skb = skb_get(__skb); |
213 | 213 | ||
214 | if (skb->len >= NLMSG_SPACE(0)) { | 214 | if (skb->len >= NLMSG_SPACE(0)) { |
215 | nlh = (struct nlmsghdr *)skb->data; | 215 | nlh = nlmsg_hdr(skb); |
216 | 216 | ||
217 | if (nlh->nlmsg_len < sizeof(struct cn_msg) || | 217 | if (nlh->nlmsg_len < sizeof(struct cn_msg) || |
218 | skb->len < nlh->nlmsg_len || | 218 | skb->len < nlh->nlmsg_len || |
diff --git a/drivers/scsi/scsi_netlink.c b/drivers/scsi/scsi_netlink.c index 1b59b27e887f..45646a285244 100644 --- a/drivers/scsi/scsi_netlink.c +++ b/drivers/scsi/scsi_netlink.c | |||
@@ -50,7 +50,7 @@ scsi_nl_rcv_msg(struct sk_buff *skb) | |||
50 | while (skb->len >= NLMSG_SPACE(0)) { | 50 | while (skb->len >= NLMSG_SPACE(0)) { |
51 | err = 0; | 51 | err = 0; |
52 | 52 | ||
53 | nlh = (struct nlmsghdr *) skb->data; | 53 | nlh = nlmsg_hdr(skb); |
54 | if ((nlh->nlmsg_len < (sizeof(*nlh) + sizeof(*hdr))) || | 54 | if ((nlh->nlmsg_len < (sizeof(*nlh) + sizeof(*hdr))) || |
55 | (skb->len < nlh->nlmsg_len)) { | 55 | (skb->len < nlh->nlmsg_len)) { |
56 | printk(KERN_WARNING "%s: discarding partial skb\n", | 56 | printk(KERN_WARNING "%s: discarding partial skb\n", |
diff --git a/drivers/scsi/scsi_transport_iscsi.c b/drivers/scsi/scsi_transport_iscsi.c index ce0d14af33c8..10590cd7e9ed 100644 --- a/drivers/scsi/scsi_transport_iscsi.c +++ b/drivers/scsi/scsi_transport_iscsi.c | |||
@@ -1081,7 +1081,7 @@ iscsi_if_rx(struct sock *sk, int len) | |||
1081 | struct nlmsghdr *nlh; | 1081 | struct nlmsghdr *nlh; |
1082 | struct iscsi_uevent *ev; | 1082 | struct iscsi_uevent *ev; |
1083 | 1083 | ||
1084 | nlh = (struct nlmsghdr *)skb->data; | 1084 | nlh = nlmsg_hdr(skb); |
1085 | if (nlh->nlmsg_len < sizeof(*nlh) || | 1085 | if (nlh->nlmsg_len < sizeof(*nlh) || |
1086 | skb->len < nlh->nlmsg_len) { | 1086 | skb->len < nlh->nlmsg_len) { |
1087 | break; | 1087 | break; |