* [PATCH 08/13] Bluetooth: Fix bug with ERTM minimum packet length
From: Marcel Holtmann @ 2010-07-08 19:59 UTC (permalink / raw)
To: David Miller; +Cc: netdev
In-Reply-To: <cover.1278619047.git.marcel@holtmann.org>
From: Nathan Holstein <nathan@lampreynetworks.com>
ERTM and streaming mode L2CAP sockets have no minimum packet length. Only
basic mode connections have minimum length.
Instead, validate the packet containing all necessary control, FCS,
and SAR fields.
The patch fixes the drop of valid packets with length lower than 4.
Signed-off-by: Nathan Holstein <ngh@isomerica.net>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
---
net/bluetooth/l2cap.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c
index df21cdc..63b0a7d 100644
--- a/net/bluetooth/l2cap.c
+++ b/net/bluetooth/l2cap.c
@@ -4085,9 +4085,9 @@ static inline int l2cap_data_channel(struct l2cap_conn *conn, u16 cid, struct sk
{
struct sock *sk;
struct l2cap_pinfo *pi;
- u16 control, len;
+ u16 control;
u8 tx_seq, req_seq;
- int next_tx_seq_offset, req_seq_offset;
+ int len, next_tx_seq_offset, req_seq_offset;
sk = l2cap_get_chan_by_scid(&conn->chan_list, cid);
if (!sk) {
@@ -4157,7 +4157,7 @@ static inline int l2cap_data_channel(struct l2cap_conn *conn, u16 cid, struct sk
}
if (__is_iframe(control)) {
- if (len < 4) {
+ if (len < 0) {
l2cap_send_disconn_req(pi->conn, sk);
goto drop;
}
@@ -4185,7 +4185,7 @@ static inline int l2cap_data_channel(struct l2cap_conn *conn, u16 cid, struct sk
if (pi->fcs == L2CAP_FCS_CRC16)
len -= 2;
- if (len > pi->mps || len < 4 || __is_sframe(control))
+ if (len > pi->mps || len < 0 || __is_sframe(control))
goto drop;
if (l2cap_check_fcs(pi, skb))
--
1.7.1.1
^ permalink raw reply related
* [PATCH 09/13] Bluetooth: Proper shutdown ERTM when closing the channel
From: Marcel Holtmann @ 2010-07-08 19:59 UTC (permalink / raw)
To: David Miller; +Cc: netdev
In-Reply-To: <cover.1278619047.git.marcel@holtmann.org>
From: Gustavo F. Padovan <padovan@profusion.mobi>
Fix a crash regarding the Monitor Timeout, it was running even after the
shutdown of the ACL connection, which doesn't make sense.
The same code also fixes another issue, before this patch L2CAP was sending
many Disconnections Requests while we have to send only one.
The issues are related to each other, a expired Monitor Timeout can
trigger a Disconnection Request and then we may have a crash if the link
was already deleted.
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
---
net/bluetooth/l2cap.c | 59 ++++++++++++++++++++++++++++++------------------
1 files changed, 37 insertions(+), 22 deletions(-)
diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c
index 63b0a7d..41c9887 100644
--- a/net/bluetooth/l2cap.c
+++ b/net/bluetooth/l2cap.c
@@ -272,6 +272,24 @@ static void l2cap_chan_del(struct sock *sk, int err)
parent->sk_data_ready(parent, 0);
} else
sk->sk_state_change(sk);
+
+ skb_queue_purge(TX_QUEUE(sk));
+
+ if (l2cap_pi(sk)->mode == L2CAP_MODE_ERTM) {
+ struct srej_list *l, *tmp;
+
+ del_timer(&l2cap_pi(sk)->retrans_timer);
+ del_timer(&l2cap_pi(sk)->monitor_timer);
+ del_timer(&l2cap_pi(sk)->ack_timer);
+
+ skb_queue_purge(SREJ_QUEUE(sk));
+ skb_queue_purge(BUSY_QUEUE(sk));
+
+ list_for_each_entry_safe(l, tmp, SREJ_LIST(sk), list) {
+ list_del(&l->list);
+ kfree(l);
+ }
+ }
}
/* Service level security */
@@ -345,8 +363,12 @@ static inline void l2cap_send_sframe(struct l2cap_pinfo *pi, u16 control)
struct sk_buff *skb;
struct l2cap_hdr *lh;
struct l2cap_conn *conn = pi->conn;
+ struct sock *sk = (struct sock *)pi;
int count, hlen = L2CAP_HDR_SIZE + 2;
+ if (sk->sk_state != BT_CONNECTED)
+ return;
+
if (pi->fcs == L2CAP_FCS_CRC16)
hlen += 2;
@@ -432,10 +454,23 @@ static void l2cap_send_disconn_req(struct l2cap_conn *conn, struct sock *sk)
{
struct l2cap_disconn_req req;
+ if (!conn)
+ return;
+
+ skb_queue_purge(TX_QUEUE(sk));
+
+ if (l2cap_pi(sk)->mode == L2CAP_MODE_ERTM) {
+ del_timer(&l2cap_pi(sk)->retrans_timer);
+ del_timer(&l2cap_pi(sk)->monitor_timer);
+ del_timer(&l2cap_pi(sk)->ack_timer);
+ }
+
req.dcid = cpu_to_le16(l2cap_pi(sk)->dcid);
req.scid = cpu_to_le16(l2cap_pi(sk)->scid);
l2cap_send_cmd(conn, l2cap_get_ident(conn),
L2CAP_DISCONN_REQ, sizeof(req), &req);
+
+ sk->sk_state = BT_DISCONN;
}
/* ---- L2CAP connections ---- */
@@ -726,7 +761,6 @@ static void __l2cap_sock_close(struct sock *sk, int reason)
sk->sk_type == SOCK_STREAM) {
struct l2cap_conn *conn = l2cap_pi(sk)->conn;
- sk->sk_state = BT_DISCONN;
l2cap_sock_set_timer(sk, sk->sk_sndtimeo);
l2cap_send_disconn_req(conn, sk);
} else
@@ -1407,6 +1441,8 @@ static int l2cap_ertm_send(struct sock *sk)
u16 control, fcs;
int nsent = 0;
+ if (sk->sk_state != BT_CONNECTED)
+ return -ENOTCONN;
while ((skb = sk->sk_send_head) && (!l2cap_tx_window_full(sk))) {
@@ -3065,7 +3101,6 @@ static inline int l2cap_config_rsp(struct l2cap_conn *conn, struct l2cap_cmd_hdr
}
default:
- sk->sk_state = BT_DISCONN;
sk->sk_err = ECONNRESET;
l2cap_sock_set_timer(sk, HZ * 5);
l2cap_send_disconn_req(conn, sk);
@@ -3119,16 +3154,6 @@ static inline int l2cap_disconnect_req(struct l2cap_conn *conn, struct l2cap_cmd
sk->sk_shutdown = SHUTDOWN_MASK;
- skb_queue_purge(TX_QUEUE(sk));
-
- if (l2cap_pi(sk)->mode == L2CAP_MODE_ERTM) {
- skb_queue_purge(SREJ_QUEUE(sk));
- skb_queue_purge(BUSY_QUEUE(sk));
- del_timer(&l2cap_pi(sk)->retrans_timer);
- del_timer(&l2cap_pi(sk)->monitor_timer);
- del_timer(&l2cap_pi(sk)->ack_timer);
- }
-
l2cap_chan_del(sk, ECONNRESET);
bh_unlock_sock(sk);
@@ -3151,16 +3176,6 @@ static inline int l2cap_disconnect_rsp(struct l2cap_conn *conn, struct l2cap_cmd
if (!sk)
return 0;
- skb_queue_purge(TX_QUEUE(sk));
-
- if (l2cap_pi(sk)->mode == L2CAP_MODE_ERTM) {
- skb_queue_purge(SREJ_QUEUE(sk));
- skb_queue_purge(BUSY_QUEUE(sk));
- del_timer(&l2cap_pi(sk)->retrans_timer);
- del_timer(&l2cap_pi(sk)->monitor_timer);
- del_timer(&l2cap_pi(sk)->ack_timer);
- }
-
l2cap_chan_del(sk, 0);
bh_unlock_sock(sk);
--
1.7.1.1
^ permalink raw reply related
* [PATCH 10/13] Bluetooth: Fix L2CAP control bit field corruption
From: Marcel Holtmann @ 2010-07-08 19:59 UTC (permalink / raw)
To: David Miller; +Cc: netdev
In-Reply-To: <cover.1278619047.git.marcel@holtmann.org>
From: Gustavo F. Padovan <padovan@profusion.mobi>
When resending an I-frame, ERTM was reusing the control bits from the last
time it was sent, that was causing a corruption in the new control field
due to it dirty fields.
This patches extracts only the SAR bits from the old field and reuse it to
resend the packet, the others bits should be reset and receive the
updated value.
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
---
net/bluetooth/l2cap.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c
index 41c9887..6785e52 100644
--- a/net/bluetooth/l2cap.c
+++ b/net/bluetooth/l2cap.c
@@ -1422,6 +1422,8 @@ static void l2cap_retransmit_one_frame(struct sock *sk, u8 tx_seq)
tx_skb = skb_clone(skb, GFP_ATOMIC);
bt_cb(skb)->retries++;
control = get_unaligned_le16(tx_skb->data + L2CAP_HDR_SIZE);
+ control &= L2CAP_CTRL_SAR;
+
control |= (pi->buffer_seq << L2CAP_CTRL_REQSEQ_SHIFT)
| (tx_seq << L2CAP_CTRL_TXSEQ_SHIFT);
put_unaligned_le16(control, tx_skb->data + L2CAP_HDR_SIZE);
@@ -1457,6 +1459,8 @@ static int l2cap_ertm_send(struct sock *sk)
bt_cb(skb)->retries++;
control = get_unaligned_le16(tx_skb->data + L2CAP_HDR_SIZE);
+ control &= L2CAP_CTRL_SAR;
+
if (pi->conn_state & L2CAP_CONN_SEND_FBIT) {
control |= L2CAP_CTRL_FINAL;
pi->conn_state &= ~L2CAP_CONN_SEND_FBIT;
--
1.7.1.1
^ permalink raw reply related
* [PATCH 11/13] Bluetooth: Check L2CAP pending status before sending connect request
From: Marcel Holtmann @ 2010-07-08 20:00 UTC (permalink / raw)
To: David Miller; +Cc: netdev
In-Reply-To: <cover.1278619047.git.marcel@holtmann.org>
From: Andrei Emeltchenko <andrei.emeltchenko@nokia.com>
Due to race condition in L2CAP state machine L2CAP Connection Request
may be sent twice for SDP with the same source channel id. Problems
reported connecting to Apple products, some carkit, Blackberry phones.
...
2010-06-07 21:18:03.651031 < ACL data: handle 1 flags 0x02 dlen 12
L2CAP(s): Connect req: psm 1 scid 0x0040
2010-06-07 21:18:03.653473 > HCI Event: Number of Completed Packets (0x13) plen 5
handle 1 packets 1
2010-06-07 21:18:03.653808 > HCI Event: Auth Complete (0x06) plen 3
status 0x00 handle 1
2010-06-07 21:18:03.653869 < ACL data: handle 1 flags 0x02 dlen 12
L2CAP(s): Connect req: psm 1 scid 0x0040
...
Patch uses L2CAP_CONF_CONNECT_PEND flag to mark that L2CAP Connection
Request has been sent already.
Modified version of patch from Ville Tervo.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@nokia.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
---
net/bluetooth/l2cap.c | 14 +++++++++++---
1 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c
index 6785e52..c2fb26d 100644
--- a/net/bluetooth/l2cap.c
+++ b/net/bluetooth/l2cap.c
@@ -417,6 +417,11 @@ static inline void l2cap_send_rr_or_rnr(struct l2cap_pinfo *pi, u16 control)
l2cap_send_sframe(pi, control);
}
+static inline int __l2cap_no_conn_pending(struct sock *sk)
+{
+ return !(l2cap_pi(sk)->conf_state & L2CAP_CONF_CONNECT_PEND);
+}
+
static void l2cap_do_start(struct sock *sk)
{
struct l2cap_conn *conn = l2cap_pi(sk)->conn;
@@ -425,12 +430,13 @@ static void l2cap_do_start(struct sock *sk)
if (!(conn->info_state & L2CAP_INFO_FEAT_MASK_REQ_DONE))
return;
- if (l2cap_check_security(sk)) {
+ if (l2cap_check_security(sk) && __l2cap_no_conn_pending(sk)) {
struct l2cap_conn_req req;
req.scid = cpu_to_le16(l2cap_pi(sk)->scid);
req.psm = l2cap_pi(sk)->psm;
l2cap_pi(sk)->ident = l2cap_get_ident(conn);
+ l2cap_pi(sk)->conf_state |= L2CAP_CONF_CONNECT_PEND;
l2cap_send_cmd(conn, l2cap_pi(sk)->ident,
L2CAP_CONN_REQ, sizeof(req), &req);
@@ -493,12 +499,14 @@ static void l2cap_conn_start(struct l2cap_conn *conn)
}
if (sk->sk_state == BT_CONNECT) {
- if (l2cap_check_security(sk)) {
+ if (l2cap_check_security(sk) &&
+ __l2cap_no_conn_pending(sk)) {
struct l2cap_conn_req req;
req.scid = cpu_to_le16(l2cap_pi(sk)->scid);
req.psm = l2cap_pi(sk)->psm;
l2cap_pi(sk)->ident = l2cap_get_ident(conn);
+ l2cap_pi(sk)->conf_state |= L2CAP_CONF_CONNECT_PEND;
l2cap_send_cmd(conn, l2cap_pi(sk)->ident,
L2CAP_CONN_REQ, sizeof(req), &req);
@@ -2948,7 +2956,6 @@ static inline int l2cap_connect_rsp(struct l2cap_conn *conn, struct l2cap_cmd_hd
l2cap_pi(sk)->ident = 0;
l2cap_pi(sk)->dcid = dcid;
l2cap_pi(sk)->conf_state |= L2CAP_CONF_REQ_SENT;
-
l2cap_pi(sk)->conf_state &= ~L2CAP_CONF_CONNECT_PEND;
l2cap_send_cmd(conn, l2cap_get_ident(conn), L2CAP_CONF_REQ,
@@ -4430,6 +4437,7 @@ static int l2cap_security_cfm(struct hci_conn *hcon, u8 status, u8 encrypt)
req.psm = l2cap_pi(sk)->psm;
l2cap_pi(sk)->ident = l2cap_get_ident(conn);
+ l2cap_pi(sk)->conf_state |= L2CAP_CONF_CONNECT_PEND;
l2cap_send_cmd(conn, l2cap_pi(sk)->ident,
L2CAP_CONN_REQ, sizeof(req), &req);
--
1.7.1.1
^ permalink raw reply related
* [PATCH 12/13] Bluetooth: Reset the security level after an authentication failure
From: Marcel Holtmann @ 2010-07-08 20:00 UTC (permalink / raw)
To: David Miller; +Cc: netdev
In-Reply-To: <cover.1278619047.git.marcel@holtmann.org>
From: Johan Hedberg <johan.hedberg@nokia.com>
When authentication fails for a connection the assumed security level
should be set back to BT_SECURITY_LOW so that subsequent connect
attempts over the same link don't falsely assume that security is
adequate enough.
Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
---
net/bluetooth/hci_event.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index 6c57fc7..786b5de 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -1049,6 +1049,8 @@ static inline void hci_auth_complete_evt(struct hci_dev *hdev, struct sk_buff *s
if (conn) {
if (!ev->status)
conn->link_mode |= HCI_LM_AUTH;
+ else
+ conn->sec_level = BT_SECURITY_LOW;
clear_bit(HCI_CONN_AUTH_PEND, &conn->pend);
--
1.7.1.1
^ permalink raw reply related
* [PATCH 13/13] Bluetooth: Update sec_level/auth_type for already existing connections
From: Marcel Holtmann @ 2010-07-08 20:00 UTC (permalink / raw)
To: David Miller; +Cc: netdev
In-Reply-To: <cover.1278619047.git.marcel@holtmann.org>
From: Ville Tervo <ville.tervo@nokia.com>
Update auth level for already existing connections if it is lower
than required by new connection.
Signed-off-by: Ville Tervo <ville.tervo@nokia.com>
Reviewed-by: Emeltchenko Andrei <andrei.emeltchenko@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@nokia.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
---
net/bluetooth/hci_conn.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c
index b10e3cd..800b6b9 100644
--- a/net/bluetooth/hci_conn.c
+++ b/net/bluetooth/hci_conn.c
@@ -358,6 +358,11 @@ struct hci_conn *hci_connect(struct hci_dev *hdev, int type, bdaddr_t *dst, __u8
acl->sec_level = sec_level;
acl->auth_type = auth_type;
hci_acl_connect(acl);
+ } else {
+ if (acl->sec_level < sec_level)
+ acl->sec_level = sec_level;
+ if (acl->auth_type < auth_type)
+ acl->auth_type = auth_type;
}
if (type == ACL_LINK)
--
1.7.1.1
^ permalink raw reply related
* [PATCH 3/6 net-next-2.6] vxge: Fix multicast issues (corrected)
From: Jon Mason @ 2010-07-08 20:06 UTC (permalink / raw)
To: David Miller; +Cc: netdev@vger.kernel.org, Sreenivasa Honnur, Ramkrishna Vepa
In-Reply-To: <20100708192213.GC15167@exar.com>
Fix error in multicast flag check, add calls to restore the status of
multicast and promiscuous mode settings after change_mtu, and style
cleanups to shorten the function calls by using a temporary variable.
Signed-off-by: Jon Mason <jon.mason@exar.com>
Signed-off-by: Sreenivasa Honnur <sreenivasa.honnur@exar.com>
Signed-off-by: Ramkrishna Vepa <ramkrishna.vepa@exar.com>
---
drivers/net/vxge/vxge-main.c | 270 +++++++++++++++++++++++-------------------
1 files changed, 146 insertions(+), 124 deletions(-)
diff --git a/drivers/net/vxge/vxge-main.c b/drivers/net/vxge/vxge-main.c
index b8eed71..f921196 100644
--- a/drivers/net/vxge/vxge-main.c
+++ b/drivers/net/vxge/vxge-main.c
@@ -1091,7 +1091,8 @@ static void vxge_set_multicast(struct net_device *dev)
struct netdev_hw_addr *ha;
struct vxgedev *vdev;
int i, mcast_cnt = 0;
- struct __vxge_hw_device *hldev;
+ struct __vxge_hw_device *hldev;
+ struct vxge_vpath *vpath;
enum vxge_hw_status status = VXGE_HW_OK;
struct macInfo mac_info;
int vpath_idx = 0;
@@ -1111,46 +1112,48 @@ static void vxge_set_multicast(struct net_device *dev)
if ((dev->flags & IFF_ALLMULTI) && (!vdev->all_multi_flg)) {
for (i = 0; i < vdev->no_of_vpath; i++) {
- vxge_assert(vdev->vpaths[i].is_open);
- status = vxge_hw_vpath_mcast_enable(
- vdev->vpaths[i].handle);
+ vpath = &vdev->vpaths[i];
+ vxge_assert(vpath->is_open);
+ status = vxge_hw_vpath_mcast_enable(vpath->handle);
+ if (status != VXGE_HW_OK)
+ vxge_debug_init(VXGE_ERR, "failed to enable "
+ "multicast, status %d", status);
vdev->all_multi_flg = 1;
}
- } else if ((dev->flags & IFF_ALLMULTI) && (vdev->all_multi_flg)) {
+ } else if (!(dev->flags & IFF_ALLMULTI) && (vdev->all_multi_flg)) {
for (i = 0; i < vdev->no_of_vpath; i++) {
- vxge_assert(vdev->vpaths[i].is_open);
- status = vxge_hw_vpath_mcast_disable(
- vdev->vpaths[i].handle);
- vdev->all_multi_flg = 1;
+ vpath = &vdev->vpaths[i];
+ vxge_assert(vpath->is_open);
+ status = vxge_hw_vpath_mcast_disable(vpath->handle);
+ if (status != VXGE_HW_OK)
+ vxge_debug_init(VXGE_ERR, "failed to disable "
+ "multicast, status %d", status);
+ vdev->all_multi_flg = 0;
}
}
- if (status != VXGE_HW_OK)
- vxge_debug_init(VXGE_ERR,
- "failed to %s multicast, status %d",
- dev->flags & IFF_ALLMULTI ?
- "enable" : "disable", status);
if (!vdev->config.addr_learn_en) {
- if (dev->flags & IFF_PROMISC) {
- for (i = 0; i < vdev->no_of_vpath; i++) {
- vxge_assert(vdev->vpaths[i].is_open);
+ for (i = 0; i < vdev->no_of_vpath; i++) {
+ vpath = &vdev->vpaths[i];
+ vxge_assert(vpath->is_open);
+
+ if (dev->flags & IFF_PROMISC)
status = vxge_hw_vpath_promisc_enable(
- vdev->vpaths[i].handle);
- }
- } else {
- for (i = 0; i < vdev->no_of_vpath; i++) {
- vxge_assert(vdev->vpaths[i].is_open);
+ vpath->handle);
+ else
status = vxge_hw_vpath_promisc_disable(
- vdev->vpaths[i].handle);
- }
+ vpath->handle);
+ if (status != VXGE_HW_OK)
+ vxge_debug_init(VXGE_ERR, "failed to %s promisc"
+ ", status %d", dev->flags&IFF_PROMISC ?
+ "enable" : "disable", status);
}
}
memset(&mac_info, 0, sizeof(struct macInfo));
/* Update individual M_CAST address list */
if ((!vdev->all_multi_flg) && netdev_mc_count(dev)) {
-
mcast_cnt = vdev->vpaths[0].mcast_addr_cnt;
list_head = &vdev->vpaths[0].mac_addr_list;
if ((netdev_mc_count(dev) +
@@ -1160,14 +1163,7 @@ static void vxge_set_multicast(struct net_device *dev)
/* Delete previous MC's */
for (i = 0; i < mcast_cnt; i++) {
- if (!list_empty(list_head))
- mac_entry = (struct vxge_mac_addrs *)
- list_first_entry(list_head,
- struct vxge_mac_addrs,
- item);
-
list_for_each_safe(entry, next, list_head) {
-
mac_entry = (struct vxge_mac_addrs *) entry;
/* Copy the mac address to delete */
mac_address = (u8 *)&mac_entry->macaddr;
@@ -1210,9 +1206,7 @@ _set_all_mcast:
mcast_cnt = vdev->vpaths[0].mcast_addr_cnt;
/* Delete previous MC's */
for (i = 0; i < mcast_cnt; i++) {
-
list_for_each_safe(entry, next, list_head) {
-
mac_entry = (struct vxge_mac_addrs *) entry;
/* Copy the mac address to delete */
mac_address = (u8 *)&mac_entry->macaddr;
@@ -1232,9 +1226,10 @@ _set_all_mcast:
/* Enable all multicast */
for (i = 0; i < vdev->no_of_vpath; i++) {
- vxge_assert(vdev->vpaths[i].is_open);
- status = vxge_hw_vpath_mcast_enable(
- vdev->vpaths[i].handle);
+ vpath = &vdev->vpaths[i];
+ vxge_assert(vpath->is_open);
+
+ status = vxge_hw_vpath_mcast_enable(vpath->handle);
if (status != VXGE_HW_OK) {
vxge_debug_init(VXGE_ERR,
"%s:%d Enabling all multicasts failed",
@@ -1395,6 +1390,7 @@ void vxge_vpath_intr_disable(struct vxgedev *vdev, int vp_id)
static int vxge_reset_vpath(struct vxgedev *vdev, int vp_id)
{
enum vxge_hw_status status = VXGE_HW_OK;
+ struct vxge_vpath *vpath = &vdev->vpaths[vp_id];
int ret = 0;
/* check if device is down already */
@@ -1405,12 +1401,10 @@ static int vxge_reset_vpath(struct vxgedev *vdev, int vp_id)
if (test_bit(__VXGE_STATE_RESET_CARD, &vdev->state))
return 0;
- if (vdev->vpaths[vp_id].handle) {
- if (vxge_hw_vpath_reset(vdev->vpaths[vp_id].handle)
- == VXGE_HW_OK) {
+ if (vpath->handle) {
+ if (vxge_hw_vpath_reset(vpath->handle) == VXGE_HW_OK) {
if (is_vxge_card_up(vdev) &&
- vxge_hw_vpath_recover_from_reset(
- vdev->vpaths[vp_id].handle)
+ vxge_hw_vpath_recover_from_reset(vpath->handle)
!= VXGE_HW_OK) {
vxge_debug_init(VXGE_ERR,
"vxge_hw_vpath_recover_from_reset"
@@ -1426,11 +1420,20 @@ static int vxge_reset_vpath(struct vxgedev *vdev, int vp_id)
} else
return VXGE_HW_FAIL;
- vxge_restore_vpath_mac_addr(&vdev->vpaths[vp_id]);
- vxge_restore_vpath_vid_table(&vdev->vpaths[vp_id]);
+ vxge_restore_vpath_mac_addr(vpath);
+ vxge_restore_vpath_vid_table(vpath);
/* Enable all broadcast */
- vxge_hw_vpath_bcast_enable(vdev->vpaths[vp_id].handle);
+ vxge_hw_vpath_bcast_enable(vpath->handle);
+
+ /* Enable all multicast */
+ if (vdev->all_multi_flg) {
+ status = vxge_hw_vpath_mcast_enable(vpath->handle);
+ if (status != VXGE_HW_OK)
+ vxge_debug_init(VXGE_ERR,
+ "%s:%d Enabling multicast failed",
+ __func__, __LINE__);
+ }
/* Enable the interrupts */
vxge_vpath_intr_enable(vdev, vp_id);
@@ -1438,17 +1441,17 @@ static int vxge_reset_vpath(struct vxgedev *vdev, int vp_id)
smp_wmb();
/* Enable the flow of traffic through the vpath */
- vxge_hw_vpath_enable(vdev->vpaths[vp_id].handle);
+ vxge_hw_vpath_enable(vpath->handle);
smp_wmb();
- vxge_hw_vpath_rx_doorbell_init(vdev->vpaths[vp_id].handle);
- vdev->vpaths[vp_id].ring.last_status = VXGE_HW_OK;
+ vxge_hw_vpath_rx_doorbell_init(vpath->handle);
+ vpath->ring.last_status = VXGE_HW_OK;
/* Vpath reset done */
clear_bit(vp_id, &vdev->vp_reset);
/* Start the vpath queue */
- vxge_wake_tx_queue(&vdev->vpaths[vp_id].fifo);
+ vxge_wake_tx_queue(&vpath->fifo);
return ret;
}
@@ -1482,9 +1485,9 @@ static int do_vxge_reset(struct vxgedev *vdev, int event)
vxge_debug_init(VXGE_ERR,
"%s: execution mode is debug, returning..",
vdev->ndev->name);
- clear_bit(__VXGE_STATE_CARD_UP, &vdev->state);
- netif_tx_stop_all_queues(vdev->ndev);
- return 0;
+ clear_bit(__VXGE_STATE_CARD_UP, &vdev->state);
+ netif_tx_stop_all_queues(vdev->ndev);
+ return 0;
}
}
@@ -1631,8 +1634,7 @@ out:
*/
int vxge_reset(struct vxgedev *vdev)
{
- do_vxge_reset(vdev, VXGE_LL_FULL_RESET);
- return 0;
+ return do_vxge_reset(vdev, VXGE_LL_FULL_RESET);
}
/**
@@ -1995,17 +1997,17 @@ enum vxge_hw_status vxge_restore_vpath_mac_addr(struct vxge_vpath *vpath)
/* reset vpaths */
enum vxge_hw_status vxge_reset_all_vpaths(struct vxgedev *vdev)
{
- int i;
enum vxge_hw_status status = VXGE_HW_OK;
+ struct vxge_vpath *vpath;
+ int i;
- for (i = 0; i < vdev->no_of_vpath; i++)
- if (vdev->vpaths[i].handle) {
- if (vxge_hw_vpath_reset(vdev->vpaths[i].handle)
- == VXGE_HW_OK) {
+ for (i = 0; i < vdev->no_of_vpath; i++) {
+ vpath = &vdev->vpaths[i];
+ if (vpath->handle) {
+ if (vxge_hw_vpath_reset(vpath->handle) == VXGE_HW_OK) {
if (is_vxge_card_up(vdev) &&
vxge_hw_vpath_recover_from_reset(
- vdev->vpaths[i].handle)
- != VXGE_HW_OK) {
+ vpath->handle) != VXGE_HW_OK) {
vxge_debug_init(VXGE_ERR,
"vxge_hw_vpath_recover_"
"from_reset failed for vpath: "
@@ -2019,83 +2021,87 @@ enum vxge_hw_status vxge_reset_all_vpaths(struct vxgedev *vdev)
return status;
}
}
+ }
+
return status;
}
/* close vpaths */
void vxge_close_vpaths(struct vxgedev *vdev, int index)
{
+ struct vxge_vpath *vpath;
int i;
+
for (i = index; i < vdev->no_of_vpath; i++) {
- if (vdev->vpaths[i].handle && vdev->vpaths[i].is_open) {
- vxge_hw_vpath_close(vdev->vpaths[i].handle);
+ vpath = &vdev->vpaths[i];
+
+ if (vpath->handle && vpath->is_open) {
+ vxge_hw_vpath_close(vpath->handle);
vdev->stats.vpaths_open--;
}
- vdev->vpaths[i].is_open = 0;
- vdev->vpaths[i].handle = NULL;
+ vpath->is_open = 0;
+ vpath->handle = NULL;
}
}
/* open vpaths */
int vxge_open_vpaths(struct vxgedev *vdev)
{
+ struct vxge_hw_vpath_attr attr;
enum vxge_hw_status status;
- int i;
+ struct vxge_vpath *vpath;
u32 vp_id = 0;
- struct vxge_hw_vpath_attr attr;
+ int i;
for (i = 0; i < vdev->no_of_vpath; i++) {
- vxge_assert(vdev->vpaths[i].is_configured);
- attr.vp_id = vdev->vpaths[i].device_id;
+ vpath = &vdev->vpaths[i];
+
+ vxge_assert(vpath->is_configured);
+ attr.vp_id = vpath->device_id;
attr.fifo_attr.callback = vxge_xmit_compl;
attr.fifo_attr.txdl_term = vxge_tx_term;
attr.fifo_attr.per_txdl_space = sizeof(struct vxge_tx_priv);
- attr.fifo_attr.userdata = (void *)&vdev->vpaths[i].fifo;
+ attr.fifo_attr.userdata = &vpath->fifo;
attr.ring_attr.callback = vxge_rx_1b_compl;
attr.ring_attr.rxd_init = vxge_rx_initial_replenish;
attr.ring_attr.rxd_term = vxge_rx_term;
attr.ring_attr.per_rxd_space = sizeof(struct vxge_rx_priv);
- attr.ring_attr.userdata = (void *)&vdev->vpaths[i].ring;
+ attr.ring_attr.userdata = &vpath->ring;
- vdev->vpaths[i].ring.ndev = vdev->ndev;
- vdev->vpaths[i].ring.pdev = vdev->pdev;
- status = vxge_hw_vpath_open(vdev->devh, &attr,
- &(vdev->vpaths[i].handle));
+ vpath->ring.ndev = vdev->ndev;
+ vpath->ring.pdev = vdev->pdev;
+ status = vxge_hw_vpath_open(vdev->devh, &attr, &vpath->handle);
if (status == VXGE_HW_OK) {
- vdev->vpaths[i].fifo.handle =
+ vpath->fifo.handle =
(struct __vxge_hw_fifo *)attr.fifo_attr.userdata;
- vdev->vpaths[i].ring.handle =
+ vpath->ring.handle =
(struct __vxge_hw_ring *)attr.ring_attr.userdata;
- vdev->vpaths[i].fifo.tx_steering_type =
+ vpath->fifo.tx_steering_type =
vdev->config.tx_steering_type;
- vdev->vpaths[i].fifo.ndev = vdev->ndev;
- vdev->vpaths[i].fifo.pdev = vdev->pdev;
- vdev->vpaths[i].fifo.indicate_max_pkts =
+ vpath->fifo.ndev = vdev->ndev;
+ vpath->fifo.pdev = vdev->pdev;
+ vpath->fifo.indicate_max_pkts =
vdev->config.fifo_indicate_max_pkts;
- vdev->vpaths[i].ring.rx_vector_no = 0;
- vdev->vpaths[i].ring.rx_csum = vdev->rx_csum;
- vdev->vpaths[i].is_open = 1;
- vdev->vp_handles[i] = vdev->vpaths[i].handle;
- vdev->vpaths[i].ring.gro_enable =
- vdev->config.gro_enable;
- vdev->vpaths[i].ring.vlan_tag_strip =
- vdev->vlan_tag_strip;
+ vpath->ring.rx_vector_no = 0;
+ vpath->ring.rx_csum = vdev->rx_csum;
+ vpath->is_open = 1;
+ vdev->vp_handles[i] = vpath->handle;
+ vpath->ring.gro_enable = vdev->config.gro_enable;
+ vpath->ring.vlan_tag_strip = vdev->vlan_tag_strip;
vdev->stats.vpaths_open++;
} else {
vdev->stats.vpath_open_fail++;
vxge_debug_init(VXGE_ERR,
"%s: vpath: %d failed to open "
"with status: %d",
- vdev->ndev->name, vdev->vpaths[i].device_id,
+ vdev->ndev->name, vpath->device_id,
status);
vxge_close_vpaths(vdev, 0);
return -EPERM;
}
- vp_id =
- ((struct __vxge_hw_vpath_handle *)vdev->vpaths[i].handle)->
- vpath->vp_id;
+ vp_id = vpath->handle->vpath->vp_id;
vdev->vpaths_deployed |= vxge_mBIT(vp_id);
}
return VXGE_HW_OK;
@@ -2269,7 +2275,6 @@ start:
vdev->vxge_entries[j].in_use = 0;
ret = pci_enable_msix(vdev->pdev, vdev->entries, vdev->intr_cnt);
-
if (ret > 0) {
vxge_debug_init(VXGE_ERR,
"%s: MSI-X enable failed for %d vectors, ret: %d",
@@ -2315,17 +2320,16 @@ static int vxge_enable_msix(struct vxgedev *vdev)
ret = vxge_alloc_msix(vdev);
if (!ret) {
for (i = 0; i < vdev->no_of_vpath; i++) {
+ struct vxge_vpath *vpath = &vdev->vpaths[i];
- /* If fifo or ring are not enabled
- the MSIX vector for that should be set to 0
- Hence initializeing this array to all 0s.
- */
- vdev->vpaths[i].ring.rx_vector_no =
- (vdev->vpaths[i].device_id *
- VXGE_HW_VPATH_MSIX_ACTIVE) + 1;
+ /* If fifo or ring are not enabled, the MSIX vector for
+ * it should be set to 0.
+ */
+ vpath->ring.rx_vector_no = (vpath->device_id *
+ VXGE_HW_VPATH_MSIX_ACTIVE) + 1;
- vxge_hw_vpath_msix_set(vdev->vpaths[i].handle,
- tim_msix_id, VXGE_ALARM_MSIX_ID);
+ vxge_hw_vpath_msix_set(vpath->handle, tim_msix_id,
+ VXGE_ALARM_MSIX_ID);
}
}
@@ -2540,9 +2544,10 @@ static void vxge_poll_vp_reset(unsigned long data)
static void vxge_poll_vp_lockup(unsigned long data)
{
struct vxgedev *vdev = (struct vxgedev *)data;
- int i;
- struct vxge_ring *ring;
enum vxge_hw_status status = VXGE_HW_OK;
+ struct vxge_vpath *vpath;
+ struct vxge_ring *ring;
+ int i;
for (i = 0; i < vdev->no_of_vpath; i++) {
ring = &vdev->vpaths[i].ring;
@@ -2556,13 +2561,13 @@ static void vxge_poll_vp_lockup(unsigned long data)
/* schedule vpath reset */
if (!test_and_set_bit(i, &vdev->vp_reset)) {
+ vpath = &vdev->vpaths[i];
/* disable interrupts for this vpath */
vxge_vpath_intr_disable(vdev, i);
/* stop the queue for this vpath */
- vxge_stop_tx_queue(&vdev->vpaths[i].
- fifo);
+ vxge_stop_tx_queue(&vpath->fifo);
continue;
}
}
@@ -2591,6 +2596,7 @@ vxge_open(struct net_device *dev)
enum vxge_hw_status status;
struct vxgedev *vdev;
struct __vxge_hw_device *hldev;
+ struct vxge_vpath *vpath;
int ret = 0;
int i;
u64 val64, function_mode;
@@ -2629,15 +2635,17 @@ vxge_open(struct net_device *dev)
netif_napi_add(dev, &vdev->napi, vxge_poll_inta,
vdev->config.napi_weight);
napi_enable(&vdev->napi);
- for (i = 0; i < vdev->no_of_vpath; i++)
- vdev->vpaths[i].ring.napi_p = &vdev->napi;
+ for (i = 0; i < vdev->no_of_vpath; i++) {
+ vpath = &vdev->vpaths[i];
+ vpath->ring.napi_p = &vdev->napi;
+ }
} else {
for (i = 0; i < vdev->no_of_vpath; i++) {
- netif_napi_add(dev, &vdev->vpaths[i].ring.napi,
+ vpath = &vdev->vpaths[i];
+ netif_napi_add(dev, &vpath->ring.napi,
vxge_poll_msix, vdev->config.napi_weight);
- napi_enable(&vdev->vpaths[i].ring.napi);
- vdev->vpaths[i].ring.napi_p =
- &vdev->vpaths[i].ring.napi;
+ napi_enable(&vpath->ring.napi);
+ vpath->ring.napi_p = &vpath->ring.napi;
}
}
@@ -2654,9 +2662,10 @@ vxge_open(struct net_device *dev)
}
for (i = 0; i < vdev->no_of_vpath; i++) {
+ vpath = &vdev->vpaths[i];
+
/* set initial mtu before enabling the device */
- status = vxge_hw_vpath_mtu_set(vdev->vpaths[i].handle,
- vdev->mtu);
+ status = vxge_hw_vpath_mtu_set(vpath->handle, vdev->mtu);
if (status != VXGE_HW_OK) {
vxge_debug_init(VXGE_ERR,
"%s: fatal: can not set new MTU", dev->name);
@@ -2670,10 +2679,21 @@ vxge_open(struct net_device *dev)
"%s: MTU is %d", vdev->ndev->name, vdev->mtu);
VXGE_DEVICE_DEBUG_LEVEL_SET(VXGE_ERR, VXGE_COMPONENT_LL, vdev);
- /* Reprogram the DA table with populated mac addresses */
- for (i = 0; i < vdev->no_of_vpath; i++) {
- vxge_restore_vpath_mac_addr(&vdev->vpaths[i]);
- vxge_restore_vpath_vid_table(&vdev->vpaths[i]);
+ /* Restore the DA, VID table and also multicast and promiscuous mode
+ * states
+ */
+ if (vdev->all_multi_flg) {
+ for (i = 0; i < vdev->no_of_vpath; i++) {
+ vpath = &vdev->vpaths[i];
+ vxge_restore_vpath_mac_addr(vpath);
+ vxge_restore_vpath_vid_table(vpath);
+
+ status = vxge_hw_vpath_mcast_enable(vpath->handle);
+ if (status != VXGE_HW_OK)
+ vxge_debug_init(VXGE_ERR,
+ "%s:%d Enabling multicast failed",
+ __func__, __LINE__);
+ }
}
/* Enable vpath to sniff all unicast/multicast traffic that not
@@ -2702,14 +2722,14 @@ vxge_open(struct net_device *dev)
/* Enabling Bcast and mcast for all vpath */
for (i = 0; i < vdev->no_of_vpath; i++) {
- status = vxge_hw_vpath_bcast_enable(vdev->vpaths[i].handle);
+ vpath = &vdev->vpaths[i];
+ status = vxge_hw_vpath_bcast_enable(vpath->handle);
if (status != VXGE_HW_OK)
vxge_debug_init(VXGE_ERR,
"%s : Can not enable bcast for vpath "
"id %d", dev->name, i);
if (vdev->config.addr_learn_en) {
- status =
- vxge_hw_vpath_mcast_enable(vdev->vpaths[i].handle);
+ status = vxge_hw_vpath_mcast_enable(vpath->handle);
if (status != VXGE_HW_OK)
vxge_debug_init(VXGE_ERR,
"%s : Can not enable mcast for vpath "
@@ -2744,9 +2764,11 @@ vxge_open(struct net_device *dev)
smp_wmb();
for (i = 0; i < vdev->no_of_vpath; i++) {
- vxge_hw_vpath_enable(vdev->vpaths[i].handle);
+ vpath = &vdev->vpaths[i];
+
+ vxge_hw_vpath_enable(vpath->handle);
smp_wmb();
- vxge_hw_vpath_rx_doorbell_init(vdev->vpaths[i].handle);
+ vxge_hw_vpath_rx_doorbell_init(vpath->handle);
}
netif_tx_start_all_queues(vdev->ndev);
^ permalink raw reply related
* Re: bnx2/5709: Strange interrupts spread
From: Christophe Ngo Van Duc @ 2010-07-08 20:06 UTC (permalink / raw)
To: Rick Jones; +Cc: netdev@vger.kernel.org
In-Reply-To: <4C326318.8050006@hp.com>
Traffic is IP no doubt about that. Lots of TCP and UDP traffic. I can
provide a very short pcap if you want (lots of traffic so pcap can be
big really quickly).
- The 2 interfaces that have this problems are running in promiscuous
mode (without having an assiged IP address to the interface) inside a
linux bridge interface (br0), but the traffic that is bridged is IP.
- The other 2 that works correctly: are not in promiscuous and have an
IP assigned to the network card.
So I am thinking that for some reason the RSS is activating only when
a specific configuration is set on the interface but not just on if it
is IP traffic or not.
Best Regards,
Christophe.
On Mon, Jul 5, 2010 at 7:56 PM, Rick Jones <rick.jones2@hp.com> wrote:
> Christophe Ngo Van Duc wrote:
>>
>> Is it a requirement that the interface has an IP address for the TX
>> and RX hash to work?
>
> At the risk of typing into Michael's keyboard, chances are, what the NIC
> does is follow Microsoft's specs for RSS, which as far as I can tell,
> discusses hashing either just on the IP addresses (v4 or v6) or the IP
> addresses and TCP port numbers, so unless Broadcom has an
> enhancement/extension, if the traffic arriving is not TCP/IP and not
> multiple connections, it probably does not get spread-out.
>
> rick jones
>
^ permalink raw reply
* [PATCH v2 -net-2.6] ll_temac: fix DMA resources leak
From: Denis Kirjanov @ 2010-07-08 20:24 UTC (permalink / raw)
To: davem; +Cc: segooon, john.linn, brian.hill, grant.likely, jpirko, netdev
V2: Check pointers before releasing resources.
Fix DMA resources leak.
Signed-off-by: Denis Kirjanov <dkirjanov@kernel.org>
Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
---
1 files changed, 32 insertions(+), 0 deletions(-)
diff --git a/drivers/net/ll_temac_main.c b/drivers/net/ll_temac_main.c
index fa303c8..b57d0ff 100644
--- a/drivers/net/ll_temac_main.c
+++ b/drivers/net/ll_temac_main.c
@@ -193,6 +193,35 @@ static int temac_dcr_setup(struct temac_local *lp, struct of_device *op,
#endif
/**
+ * * temac_dma_bd_release - Release buffer descriptor rings
+ */
+static void temac_dma_bd_release(struct net_device *ndev)
+{
+ struct temac_local *lp = netdev_priv(ndev);
+ int i;
+
+ for (i = 0; i < RX_BD_NUM; i++) {
+ if (!lp->rx_skb[i])
+ break;
+ else {
+ dma_unmap_single(ndev->dev.parent, lp->rx_bd_v[i].phys,
+ XTE_MAX_JUMBO_FRAME_SIZE, DMA_FROM_DEVICE);
+ dev_kfree_skb(lp->rx_skb[i]);
+ }
+ }
+ if (lp->rx_bd_v)
+ dma_free_coherent(ndev->dev.parent,
+ sizeof(*lp->rx_bd_v) * RX_BD_NUM,
+ lp->rx_bd_v, lp->rx_bd_p);
+ if (lp->tx_bd_v)
+ dma_free_coherent(ndev->dev.parent,
+ sizeof(*lp->tx_bd_v) * TX_BD_NUM,
+ lp->tx_bd_v, lp->tx_bd_p);
+ if (lp->rx_skb)
+ kfree(lp->rx_skb);
+}
+
+/**
* temac_dma_bd_init - Setup buffer descriptor rings
*/
static int temac_dma_bd_init(struct net_device *ndev)
@@ -275,6 +304,7 @@ static int temac_dma_bd_init(struct net_device *ndev)
return 0;
out:
+ temac_dma_bd_release(ndev);
return -ENOMEM;
}
@@ -858,6 +888,8 @@ static int temac_stop(struct net_device *ndev)
phy_disconnect(lp->phy_dev);
lp->phy_dev = NULL;
+ temac_dma_bd_release(ndev);
+
return 0;
}
^ permalink raw reply related
* Re: [PATCH 1/1] Bluetooth: hidp: Add support for hidraw HIDIOCGFEATURE and HIDIOCSFEATURE
From: Marcel Holtmann @ 2010-07-08 21:11 UTC (permalink / raw)
To: Alan Ott
Cc: David S Miller, Jiri Kosina, Michael Poole, Bastien Nocera,
Eric Dumazet, linux-bluetooth, linux-kernel, netdev
In-Reply-To: <1276467601-9066-1-git-send-email-alan@signal11.us>
Hi Alan,
> This patch adds support or getting and setting feature reports for bluetooth
> HID devices from HIDRAW.
>
> Signed-off-by: Alan Ott <alan@signal11.us>
> ---
> net/bluetooth/hidp/core.c | 121 +++++++++++++++++++++++++++++++++++++++++++--
> net/bluetooth/hidp/hidp.h | 8 +++
> 2 files changed, 125 insertions(+), 4 deletions(-)
>
> diff --git a/net/bluetooth/hidp/core.c b/net/bluetooth/hidp/core.c
> index bfe641b..0f068a0 100644
> --- a/net/bluetooth/hidp/core.c
> +++ b/net/bluetooth/hidp/core.c
> @@ -36,6 +36,7 @@
> #include <linux/file.h>
> #include <linux/init.h>
> #include <linux/wait.h>
> +#include <linux/mutex.h>
> #include <net/sock.h>
>
> #include <linux/input.h>
> @@ -313,6 +314,93 @@ static int hidp_send_report(struct hidp_session *session, struct hid_report *rep
> return hidp_queue_report(session, buf, rsize);
> }
>
> +static int hidp_get_raw_report(struct hid_device *hid,
> + unsigned char report_number,
> + unsigned char *data, size_t count,
> + unsigned char report_type)
> +{
> + struct hidp_session *session = hid->driver_data;
> + struct sk_buff *skb;
> + size_t len;
> + int numbered_reports = hid->report_enum[report_type].numbered;
> +
> + switch (report_type) {
> + case HID_FEATURE_REPORT:
> + report_type = HIDP_TRANS_GET_REPORT | HIDP_DATA_RTYPE_FEATURE;
> + break;
> + case HID_INPUT_REPORT:
> + report_type = HIDP_TRANS_GET_REPORT | HIDP_DATA_RTYPE_INPUT;
> + break;
> + case HID_OUTPUT_REPORT:
> + report_type = HIDP_TRANS_GET_REPORT | HIDP_DATA_RTYPE_OUPUT;
> + break;
> + default:
> + return -EINVAL;
> + }
> +
> + if (mutex_lock_interruptible(&session->report_mutex))
> + return -ERESTARTSYS;
> +
> + /* Set up our wait, and send the report request to the device. */
> + session->waiting_report_type = report_type & HIDP_DATA_RTYPE_MASK;
> + session->waiting_report_number = numbered_reports ? report_number : -1;
> + set_bit(HIDP_WAITING_FOR_RETURN, &session->flags);
> + data[0] = report_number;
> + if (hidp_send_ctrl_message(hid->driver_data, report_type, data, 1))
> + goto err_eio;
> +
> + /* Wait for the return of the report. The returned report
> + gets put in session->report_return. */
> + while (test_bit(HIDP_WAITING_FOR_RETURN, &session->flags)) {
> + int res;
> +
> + res = wait_event_interruptible_timeout(session->report_queue,
> + !test_bit(HIDP_WAITING_FOR_RETURN, &session->flags),
> + 5*HZ);
> + if (res == 0) {
> + /* timeout */
> + goto err_eio;
> + }
> + if (res < 0) {
> + /* signal */
> + goto err_restartsys;
> + }
> + }
> +
> + skb = session->report_return;
> + if (skb) {
> + if (numbered_reports) {
> + /* Strip off the report number. */
> + size_t rpt_len = skb->len-1;
> + len = rpt_len < count ? rpt_len : count;
> + memcpy(data, skb->data+1, len);
> + } else {
> + len = skb->len < count ? skb->len : count;
> + memcpy(data, skb->data, len);
> + }
> +
> + kfree_skb(skb);
> + session->report_return = NULL;
> + } else {
> + /* Device returned a HANDSHAKE, indicating protocol error. */
> + len = -EIO;
> + }
> +
> + clear_bit(HIDP_WAITING_FOR_RETURN, &session->flags);
> + mutex_unlock(&session->report_mutex);
> +
> + return len;
> +
> +err_restartsys:
> + clear_bit(HIDP_WAITING_FOR_RETURN, &session->flags);
> + mutex_unlock(&session->report_mutex);
> + return -ERESTARTSYS;
> +err_eio:
> + clear_bit(HIDP_WAITING_FOR_RETURN, &session->flags);
> + mutex_unlock(&session->report_mutex);
> + return -EIO;
> +}
> +
> static int hidp_output_raw_report(struct hid_device *hid, unsigned char *data, size_t count,
> unsigned char report_type)
> {
> @@ -367,6 +455,10 @@ static void hidp_process_handshake(struct hidp_session *session,
> case HIDP_HSHK_ERR_INVALID_REPORT_ID:
> case HIDP_HSHK_ERR_UNSUPPORTED_REQUEST:
> case HIDP_HSHK_ERR_INVALID_PARAMETER:
> + if (test_bit(HIDP_WAITING_FOR_RETURN, &session->flags)) {
> + clear_bit(HIDP_WAITING_FOR_RETURN, &session->flags);
> + wake_up_interruptible(&session->report_queue);
> + }
> /* FIXME: Call into SET_ GET_ handlers here */
> break;
>
> @@ -403,9 +495,11 @@ static void hidp_process_hid_control(struct hidp_session *session,
> }
> }
>
> -static void hidp_process_data(struct hidp_session *session, struct sk_buff *skb,
> +/* Returns true if the passed-in skb should be freed by the caller. */
> +static int hidp_process_data(struct hidp_session *session, struct sk_buff *skb,
> unsigned char param)
> {
> + int done_with_skb = 1;
> BT_DBG("session %p skb %p len %d param 0x%02x", session, skb, skb->len, param);
>
> switch (param) {
> @@ -417,7 +511,6 @@ static void hidp_process_data(struct hidp_session *session, struct sk_buff *skb,
>
> if (session->hid)
> hid_input_report(session->hid, HID_INPUT_REPORT, skb->data, skb->len, 0);
> -
> break;
>
> case HIDP_DATA_RTYPE_OTHER:
> @@ -429,12 +522,27 @@ static void hidp_process_data(struct hidp_session *session, struct sk_buff *skb,
> __hidp_send_ctrl_message(session,
> HIDP_TRANS_HANDSHAKE | HIDP_HSHK_ERR_INVALID_PARAMETER, NULL, 0);
> }
> +
> + if (test_bit(HIDP_WAITING_FOR_RETURN, &session->flags) &&
> + param == session->waiting_report_type) {
> + if (session->waiting_report_number < 0 ||
> + session->waiting_report_number == skb->data[0]) {
> + /* hidp_get_raw_report() is waiting on this report. */
> + session->report_return = skb;
> + done_with_skb = 0;
> + clear_bit(HIDP_WAITING_FOR_RETURN, &session->flags);
> + wake_up_interruptible(&session->report_queue);
> + }
> + }
> +
> + return done_with_skb;
> }
>
> static void hidp_recv_ctrl_frame(struct hidp_session *session,
> struct sk_buff *skb)
> {
> unsigned char hdr, type, param;
> + int free_skb = 1;
>
> BT_DBG("session %p skb %p len %d", session, skb, skb->len);
>
> @@ -454,7 +562,7 @@ static void hidp_recv_ctrl_frame(struct hidp_session *session,
> break;
>
> case HIDP_TRANS_DATA:
> - hidp_process_data(session, skb, param);
> + free_skb = hidp_process_data(session, skb, param);
> break;
>
> default:
> @@ -463,7 +571,8 @@ static void hidp_recv_ctrl_frame(struct hidp_session *session,
> break;
> }
>
> - kfree_skb(skb);
> + if (free_skb)
> + kfree_skb(skb);
> }
>
> static void hidp_recv_intr_frame(struct hidp_session *session,
> @@ -797,6 +906,7 @@ static int hidp_setup_hid(struct hidp_session *session,
> hid->dev.parent = hidp_get_device(session);
> hid->ll_driver = &hidp_hid_driver;
>
> + hid->hid_get_raw_report = hidp_get_raw_report;
> hid->hid_output_raw_report = hidp_output_raw_report;
>
> err = hid_add_device(hid);
> @@ -857,6 +967,9 @@ int hidp_add_connection(struct hidp_connadd_req *req, struct socket *ctrl_sock,
> skb_queue_head_init(&session->ctrl_transmit);
> skb_queue_head_init(&session->intr_transmit);
>
> + mutex_init(&session->report_mutex);
> + init_waitqueue_head(&session->report_queue);
> +
> session->flags = req->flags & (1 << HIDP_BLUETOOTH_VENDOR_ID);
> session->idle_to = req->idle_to;
>
> diff --git a/net/bluetooth/hidp/hidp.h b/net/bluetooth/hidp/hidp.h
> index 8d934a1..00e71dd 100644
> --- a/net/bluetooth/hidp/hidp.h
> +++ b/net/bluetooth/hidp/hidp.h
> @@ -80,6 +80,7 @@
> #define HIDP_VIRTUAL_CABLE_UNPLUG 0
> #define HIDP_BOOT_PROTOCOL_MODE 1
> #define HIDP_BLUETOOTH_VENDOR_ID 9
> +#define HIDP_WAITING_FOR_RETURN 10
>
> struct hidp_connadd_req {
> int ctrl_sock; // Connected control socket
> @@ -154,6 +155,13 @@ struct hidp_session {
> struct sk_buff_head ctrl_transmit;
> struct sk_buff_head intr_transmit;
>
> + /* Used in hidp_get_raw_report() */
> + int waiting_report_type; /* HIDP_DATA_RTYPE_* */
> + int waiting_report_number; /* -1 for not numbered */
> + struct mutex report_mutex;
> + struct sk_buff *report_return;
> + wait_queue_head_t report_queue;
> +
> /* Report descriptor */
> __u8 *rd_data;
> uint rd_size;
I looked at this and I am bit worried that this should not be done in
this detail in the HIDP driver. Essentially HIDP is a pure transport
driver. It should not handle all these details. Can we make this a bit
easier for the transport drivers to support such features?
Regards
Marcel
^ permalink raw reply
* Re: [PATCH 1/1] Bluetooth: hidp: Add support for hidraw HIDIOCGFEATURE and HIDIOCSFEATURE
From: Marcel Holtmann @ 2010-07-08 21:08 UTC (permalink / raw)
To: Andrei Emeltchenko
Cc: David Miller, ospite, alan, jkosina, mdpoole, hadess,
eric.dumazet, linux-bluetooth, linux-kernel, netdev
In-Reply-To: <AANLkTiktvYWdZmpQs_k7mJRqMCqgfhy1b0T8tX8emmtU@mail.gmail.com>
Hi Andrei,
> >> On Sun, 13 Jun 2010 18:20:01 -0400
> >> Alan Ott <alan@signal11.us> wrote:
> >>
> >>> This patch adds support or getting and setting feature reports for bluetooth
> >>> HID devices from HIDRAW.
> >>>
> >>> Signed-off-by: Alan Ott <alan@signal11.us>
> >>> ---
> >>
> >> Ping.
> >
> > We effectively don't have a bluetooth maintainer at the current point
> > in time. I've tried to let patches sit for a while hoping the listed
> > maintainer would do something, at least occaisionally, but that simply
> > isn't happening.
> > So I'll just pick patches up directly as I find time to review them,
> > but I have to warn that for me it's going to be done in a very low
> > priority way because I really don't find bluetooth all that exciting. :-)
>
> This would be good. We have a backlog of bluetooth kernel patches
> waiting for several months.
> This takes too much time to return to them again and again...
>
> Please keep this ML informed.
as soon as Ville is back from vacation, he should be helping out with
patch review and maintenance.
Regards
Marcel
^ permalink raw reply
* Re: [PATCH] sysfs: Don't allow the creation of symlinks we can't remove
From: Greg KH @ 2010-07-08 21:19 UTC (permalink / raw)
To: Eric W. Biederman
Cc: Greg KH, Andrew Morton, Rafael J. Wysocki, Maciej W. Rozycki,
Kay Sievers, Johannes Berg, netdev
In-Reply-To: <m1630q7x5v.fsf_-_@fess.ebiederm.org>
On Thu, Jul 08, 2010 at 09:31:24AM -0700, Eric W. Biederman wrote:
>
> Recently my tagged sysfs support revealed a flaw in the device core
> that a few rare drivers are running into such that we don't always put
> network devices in a class subdirectory named net/.
>
> Since we are not creating the class directory the network devices wind
> up in a non-tagged directory, but the symlinks to the network devices
> from /sys/class/net are in a tagged directory. All of which works
> until we go to remove or rename the symlink. When we remove or rename
> a symlink we look in the namespace of the target of the symlink.
> Since the target of the symlink is in a non-tagged sysfs directory we
> don't have a namespace to look in, and we fail to remove the symlink.
>
> Detect this problem up front and simply don't create symlinks we won't
> be able to remove later. This prevents symlink leakage and fails in
> a much clearer and more understandable way.
With this patch, how does the existing code fail as the drivers aren't
fixed up?
I like this change, just worried it will cause problems if it gets into
.35, without your RFC patch. Will it?
thanks,
greg k-h
^ permalink raw reply
* Re: [Bugme-new] [Bug 16350] New: RTL8103EL interface new tcp connections get stuck on SYN_SENT state after 10 hours uptime
From: Andrew Morton @ 2010-07-08 21:25 UTC (permalink / raw)
To: netdev; +Cc: bugzilla-daemon, bugme-daemon, Francois Romieu, zic422
In-Reply-To: <bug-16350-10286@https.bugzilla.kernel.org/>
(switched to email. Please respond via emailed reply-to-all, not via the
bugzilla web interface).
On Wed, 7 Jul 2010 14:04:59 GMT
bugzilla-daemon@bugzilla.kernel.org wrote:
> https://bugzilla.kernel.org/show_bug.cgi?id=16350
>
> Summary: RTL8103EL interface new tcp connections get stuck on
> SYN_SENT state after 10 hours uptime
> Product: Networking
> Version: 2.5
> Kernel Version: 2.6.34.1
> Platform: All
> OS/Version: Linux
> Tree: Mainline
> Status: NEW
> Severity: normal
> Priority: P1
> Component: IPV4
> AssignedTo: shemminger@linux-foundation.org
> ReportedBy: zic422@gmail.com
> Regression: No
>
>
> Created an attachment (id=27038)
> --> (https://bugzilla.kernel.org/attachment.cgi?id=27038)
> ioports, iomem, lspci, ver_linux and kernel config
>
> After 9-11 hours uptime network interface of RTL8103EL card cannot make new tcp
> connections to internet and correctly close existing ones. ICMP and UDP works
> fine. Besides r8169 driver I tried also the r8101-1.015.00 one from realtek
> site with older kernel and bug were in place.
>
> Connections inside home network work normally. I tried to reboot router but
> nor reconnecting ethernet cable nor restarting network daemon nor reloading
> kernel module does not make any help. Bug disappears only after rebooting my
> pc.
>
> repeatability of bug is 100% on arch, debian and gentoo
>
> default kernel config
>
> http://bugs.archlinux.org/task/19162 (this bug)
^ permalink raw reply
* Re: Squid hang up on 2.6.34
From: Eric Dumazet @ 2010-07-08 22:06 UTC (permalink / raw)
To: Felipe W Damasio; +Cc: linux-kernel, netdev
In-Reply-To: <AANLkTimn8A0cYZmwNZYitRkBHKKFe4HQ5GU626DLugkk@mail.gmail.com>
Le jeudi 08 juillet 2010 à 16:03 -0300, Felipe W Damasio a écrit :
> Hi All,
>
CC netdev
> I've been using squid for a few months now.
>
> It worked great until recently, when we upgraded to kernel 2.6.34.
>
> We're using squid on bridge scenario with TProxy.
>
> Squid simply hung up (connections with squidclient didn't work), and
> the process didn't respond to kill. I had to use "kill -9".
>
> The dmesg output was:
>
> kernel: general protection fault: 0000 [#1] SMP
> kernel: last sysfs file: /sys/devices/pci0000:00/0000:00:1f.3/i2c-0/name
> kernel: CPU 1
> kernel: Modules linked in:
>
> kernel: Pid: 18351, comm: squid Not tainted 2.6.34 #1 DX58SO/
> kernel: RIP: 0010:[<ffffffff81360c2a>] [<ffffffff81360c2a>]
> sock_rfree+0x26/0x37
> kernel: RSP: 0018:ffff88041c28fc20 EFLAGS: 00010206
> kernel: RAX: dce8dce85d415d41 RBX: ffff88038f098c00 RCX: 0000000000000720
dereferencing RAX, and RAX contains garbage (ascii chars :
"A ] A ]" ...)
At this point, RAX is supposed to contain a pointer to sk->sk_prot
static inline int sk_has_account(struct sock *sk)
{
/* return true if protocol supports memory accounting */
return !!sk->sk_prot->memory_allocated;
}
> kernel: RDX: ffff8804053b2e00 RSI: ffff88032564ee0c RDI: ffff88038f098c00
> kernel: RBP: ffff8804051b2e00 R08: 0000000000000000 R09: 0000000000000000
> kernel: R10: 0000000000020860 R11: ffff8804051b2e00 R12: 00000000000005a8
> kernel: R13: 00000000000005a8 R14: 0000000000003d21 R15: 0000000000000000
> kernel: FS: 00007f214fa8c710(0000) GS:ffff880001840000(0000)
> knlGS:0000000000000000
> kernel: CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> kernel: CR2: 000000000b388000 CR3: 000000041c4c4000 CR4: 00000000000006e0
> kernel: DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
> kernel: DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
> kernel: Process squid (pid: 18351, threadinfo ffff88041c28e000, task
> ffff88042e0fcec0)
> kernel: Stack:
> kernel: ffffffff81365dda ffff88038f098c00 ffffffff81365b8c ffff88038f098c00
> kernel: <0> ffffffff813a222a 00000000000000d0 ffffffff81366af9 000000002e0fcec0
> kernel: <0> ffff88042e0fcec0 ffff88042e0fcec0 ffff88042e0fcec0 0000000014d31cc0
> kernel: Call Trace:
> kernel: [<ffffffff81365dda>] ? skb_release_head_state+0x6d/0xb7
> kernel: [<ffffffff81365b8c>] ? __kfree_skb+0x9/0x7d
> kernel: [<ffffffff813a222a>] ? tcp_recvmsg+0x6a3/0x89a
> kernel: [<ffffffff81366af9>] ? __alloc_skb+0x5e/0x14e
> kernel: [<ffffffff81360ede>] ? sock_common_recvmsg+0x30/0x45
> kernel: [<ffffffff8135ec0f>] ? sock_aio_read+0xdd/0xf1
> kernel: [<ffffffff810ac500>] ? do_sync_read+0xb0/0xf2
> kernel: [<ffffffff8142a25e>] ? _raw_spin_lock_bh+0x9/0x1f
> kernel: [<ffffffff810acf32>] ? vfs_read+0xb9/0xff
> kernel: [<ffffffff810ad034>] ? sys_read+0x45/0x6e
> kernel: [<ffffffff8100292b>] ? system_call_fastpath+0x16/0x1b
> kernel: Code: ff ff ff ff c3 48 8b 57 18 8b 87 d8 00 00 00 48 8d 8a ac
> 00 00 00 f0 29 82 ac 00 00 00 48 8b 57 18 8b 8f d8 00 00 00 48 8b 42
> 38 <48> 83 b8 b0 00 00 00 00 74 06 01 8a f4 00 00 00 c3 41 57 41 89
> kernel: RIP [<ffffffff81360c2a>] sock_rfree+0x26/0x37
> kernel: RSP <ffff88041c28fc20>
> kernel: ---[ end trace bcd320fe508cc071 ]---
>
> Can anybody help me?
>
> What information can I provide you to track down this issue?
>
> Cheers,
>
> Felipe Damasio
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply
* Re: Squid hang up on 2.6.34
From: Eric Dumazet @ 2010-07-08 22:08 UTC (permalink / raw)
To: Felipe W Damasio; +Cc: linux-kernel, netdev
In-Reply-To: <AANLkTil49m6Ul2bauiH4Pwn-6ykrYTFmSO6_SxqQgD_e@mail.gmail.com>
Le jeudi 08 juillet 2010 à 18:30 -0300, Felipe W Damasio a écrit :
> Hi again,
>
> Just FYI: After squid hung up, I started it again.
>
> A few minutes later, the machine frooze...after a reboot, syslog
> didn't show any messages.
>
> So the message below is the only tip of what happened.
>
> Cheers,
Please try to reproduce a new report.
It looks like a memory corruption, and it would be good to see if a
common pattern is occurring.
^ permalink raw reply
* Re: [PATCH] sysfs: Don't allow the creation of symlinks we can't remove
From: Eric W. Biederman @ 2010-07-08 22:28 UTC (permalink / raw)
To: Greg KH
Cc: Greg KH, Andrew Morton, Rafael J. Wysocki, Maciej W. Rozycki,
Kay Sievers, Johannes Berg, netdev
In-Reply-To: <20100708211930.GA15385@kroah.com>
Greg KH <greg@kroah.com> writes:
> With this patch, how does the existing code fail as the drivers aren't
> fixed up?
>
> I like this change, just worried it will cause problems if it gets into
> .35, without your RFC patch. Will it?
It don't expect this patch to be worse than where we are current at.
Network devices are renamed, and come and go enough that both the
mac80211_hwsim and the bnep driver are currently unusable with a
failure only the rename and remove.
This patch simply moves the failure into creation where we are a little more
prepared to deal with problems, and this patch is limited to mac80211_hwsim,
bnep, and any hypothetically undiscovered other network devices that
have the same problem.
mac80211_hwsim with just this patch becomes somewhat usable as it's primary
network device gets registered and the module can be loaded and unloaded. It
just doesn't create the wlan0 and wlan1 interfaces for the wifi interfaces.
On a slightly unrelated note, what got us on trying to convert
mac80211_hwsim was that everything happens in a single module which
makes avoiding cleanup races hard. I am hoping bnep is structured
enough differently so we can convert it to a bus device using the
existing infrastructure. I haven't figured out bnep yet though ;(
Eric
^ permalink raw reply
* [PATCH] netfilter: add CHECKSUM target
From: Michael S. Tsirkin @ 2010-07-08 22:29 UTC (permalink / raw)
To: Michael S. Tsirkin, Patrick McHardy, David S. Miller,
Alexey Kuznetsov, "Pekka Savola (ipv6)" <pek
This adds a `CHECKSUM' target, which can be used in the iptables mangle
table.
You can use this target to compute and fill in the checksum in
an IP packet that lacks a checksum. This is particularly useful,
if you need to work around old applications such as dhcp clients,
that do not work well with checksum offloads, but don't want to
disable checksum offload in your device.
The problem happens in the field with virtualized applications.
For reference, see Red Hat bz 605555, as well as
http://www.spinics.net/lists/kvm/msg37660.html
Typical expected use (helps old dhclient binary running in a VM):
iptables -A POSTROUTING -t mangle -p udp --dport 68 -j CHECKSUM
--checksum-fill
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
Lightly tested. Please review for 2.6.36. Thanks!
include/linux/netfilter_ipv4/ipt_CHECKSUM.h | 18 +++++++
net/ipv4/netfilter/Kconfig | 16 ++++++
net/ipv4/netfilter/Makefile | 1 +
net/ipv4/netfilter/ipt_CHECKSUM.c | 72 +++++++++++++++++++++++++++
4 files changed, 107 insertions(+), 0 deletions(-)
create mode 100644 include/linux/netfilter_ipv4/ipt_CHECKSUM.h
create mode 100644 net/ipv4/netfilter/ipt_CHECKSUM.c
diff --git a/include/linux/netfilter_ipv4/ipt_CHECKSUM.h b/include/linux/netfilter_ipv4/ipt_CHECKSUM.h
new file mode 100644
index 0000000..0b0f660
--- /dev/null
+++ b/include/linux/netfilter_ipv4/ipt_CHECKSUM.h
@@ -0,0 +1,18 @@
+/* Header file for iptables ipt_CHECKSUM target
+ *
+ * (C) 2002 by Harald Welte <laforge@gnumonks.org>
+ * (C) 2010 Red Hat Inc
+ * Author: Michael S. Tsirkin <mst@redhat.com>
+ *
+ * This software is distributed under GNU GPL v2, 1991
+*/
+#ifndef _IPT_CHECKSUM_TARGET_H
+#define _IPT_CHECKSUM_TARGET_H
+
+#define IPT_CHECKSUM_OP_FILL 0x01 /* fill in checksum in IPv4 header */
+
+struct ipt_CHECKSUM_info {
+ u_int8_t operation; /* bitset of operations */
+};
+
+#endif /* _IPT_CHECKSUM_TARGET_H */
diff --git a/net/ipv4/netfilter/Kconfig b/net/ipv4/netfilter/Kconfig
index 1833bdb..2fb979b 100644
--- a/net/ipv4/netfilter/Kconfig
+++ b/net/ipv4/netfilter/Kconfig
@@ -322,6 +322,22 @@ config IP_NF_TARGET_ECN
To compile it as a module, choose M here. If unsure, say N.
+config IP_NF_TARGET_CHECKSUM
+ tristate "CHECKSUM target support"
+ depends on IP_NF_MANGLE
+ depends on NETFILTER_ADVANCED
+ ---help---
+ This option adds a `CHECKSUM' target, which can be used in the iptables mangle
+ table.
+
+ You can use this target to compute and fill in the checksum in
+ an IP packet that lacks a checksum. This is particularly useful,
+ if you need to work around old applications such as dhcp clients,
+ that do not work well with checksum offloads, but don't want to disable
+ checksum offload in your device.
+
+ To compile it as a module, choose M here. If unsure, say N.
+
config IP_NF_TARGET_TTL
tristate '"TTL" target support'
depends on NETFILTER_ADVANCED
diff --git a/net/ipv4/netfilter/Makefile b/net/ipv4/netfilter/Makefile
index 4811159..d7047bb 100644
--- a/net/ipv4/netfilter/Makefile
+++ b/net/ipv4/netfilter/Makefile
@@ -55,6 +55,7 @@ obj-$(CONFIG_IP_NF_MATCH_ECN) += ipt_ecn.o
# targets
obj-$(CONFIG_IP_NF_TARGET_CLUSTERIP) += ipt_CLUSTERIP.o
obj-$(CONFIG_IP_NF_TARGET_ECN) += ipt_ECN.o
+obj-$(CONFIG_IP_NF_TARGET_CHECKSUM) += ipt_CHECKSUM.o
obj-$(CONFIG_IP_NF_TARGET_LOG) += ipt_LOG.o
obj-$(CONFIG_IP_NF_TARGET_MASQUERADE) += ipt_MASQUERADE.o
obj-$(CONFIG_IP_NF_TARGET_NETMAP) += ipt_NETMAP.o
diff --git a/net/ipv4/netfilter/ipt_CHECKSUM.c b/net/ipv4/netfilter/ipt_CHECKSUM.c
new file mode 100644
index 0000000..b8346a1
--- /dev/null
+++ b/net/ipv4/netfilter/ipt_CHECKSUM.c
@@ -0,0 +1,72 @@
+/* iptables module for the IPv4 CHECKSUM
+ *
+ * (C) 2002 by Harald Welte <laforge@netfilter.org>
+ * (C) 2010 Red Hat, Inc.
+ *
+ * Author: Michael S. Tsirkin <mst@redhat.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+*/
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+#include <linux/in.h>
+#include <linux/module.h>
+#include <linux/skbuff.h>
+#include <linux/netdevice.h>
+
+#include <linux/netfilter/x_tables.h>
+#include <linux/netfilter_ipv4/ip_tables.h>
+#include <linux/netfilter_ipv4/ipt_CHECKSUM.h>
+
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Michael S. Tsirkin <mst@redhat.com>");
+MODULE_DESCRIPTION("Xtables: checksum modification");
+
+static unsigned int
+checksum_tg(struct sk_buff *skb, const struct xt_action_param *par)
+{
+ if (skb->ip_summed == CHECKSUM_PARTIAL) {
+ skb_checksum_help(skb);
+ }
+
+ return XT_CONTINUE;
+}
+
+static int checksum_tg_check(const struct xt_tgchk_param *par)
+{
+ const struct ipt_CHECKSUM_info *einfo = par->targinfo;
+
+ if (einfo->operation & ~IPT_CHECKSUM_OP_FILL) {
+ pr_info("unsupported CHECKSUM operation %x\n", einfo->operation);
+ return -EINVAL;
+ }
+ if (!einfo->operation) {
+ pr_info("no CHECKSUM operation enabled\n");
+ return -EINVAL;
+ }
+ return 0;
+}
+
+static struct xt_target checksum_tg_reg __read_mostly = {
+ .name = "CHECKSUM",
+ .family = NFPROTO_IPV4,
+ .target = checksum_tg,
+ .targetsize = sizeof(struct ipt_CHECKSUM_info),
+ .table = "mangle",
+ .checkentry = checksum_tg_check,
+ .me = THIS_MODULE,
+};
+
+static int __init checksum_tg_init(void)
+{
+ return xt_register_target(&checksum_tg_reg);
+}
+
+static void __exit checksum_tg_exit(void)
+{
+ xt_unregister_target(&checksum_tg_reg);
+}
+
+module_init(checksum_tg_init);
+module_exit(checksum_tg_exit);
--
1.7.2.rc0.14.g41c1c
^ permalink raw reply related
* [PATCH] extensions: libipt_CHECKSUM extension
From: Michael S. Tsirkin @ 2010-07-08 22:35 UTC (permalink / raw)
To: Patrick McHardy, David S. Miller, Alexey Kuznetsov,
Pekka Savola (ipv6), James Morris <jmorris@
In-Reply-To: <20100708222913.GA4475@redhat.com>
This adds a `CHECKSUM' target, which can be used in the iptables mangle
table.
You can use this target to compute and fill in the checksum in
an IP packet that lacks a checksum. This is particularly useful,
if you need to work around old applications such as dhcp clients,
that do not work well with checksum offloads, but don't want to disable
checksum offload in your device.
The problem happens in the field with virtualized applications.
For reference, see Red Hat bz 605555, as well as
http://www.spinics.net/lists/kvm/msg37660.html
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
This patch adds userspace support for the CHECKSUM kernel module I sent previously.
extensions/libipt_CHECKSUM.c | 100 ++++++++++++++++++++++++++++++++++++++++
extensions/libipt_CHECKSUM.man | 8 +++
2 files changed, 108 insertions(+), 0 deletions(-)
create mode 100644 extensions/libipt_CHECKSUM.c
create mode 100644 extensions/libipt_CHECKSUM.man
diff --git a/extensions/libipt_CHECKSUM.c b/extensions/libipt_CHECKSUM.c
new file mode 100644
index 0000000..93d3e3f
--- /dev/null
+++ b/extensions/libipt_CHECKSUM.c
@@ -0,0 +1,100 @@
+/* Shared library add-on to iptables for CHECKSUM
+ *
+ * (C) 2002 by Harald Welte <laforge@gnumonks.org>
+ * (C) 2010 by Red Hat, Inc
+ * Author: Michael S. Tsirkin <mst@redhat.com>
+ *
+ * This program is distributed under the terms of GNU GPL v2, 1991
+ *
+ * libipt_CHECKSUM.c borrowed heavily from libipt_ECN.c
+ *
+ * $Id$
+ */
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <getopt.h>
+
+#include <xtables.h>
+#include <linux/netfilter_ipv4/ipt_CHECKSUM.h>
+
+static void CHECKSUM_help(void)
+{
+ printf(
+"CHECKSUM target options\n"
+" --checksum-fill Fill in packet checksum.\n");
+}
+
+static const struct option CHECKSUM_opts[] = {
+ { "checksum-fill", 0, NULL, 'F' },
+ { .name = NULL }
+};
+
+static int CHECKSUM_parse(int c, char **argv, int invert, unsigned int *flags,
+ const void *entry, struct xt_entry_target **target)
+{
+ unsigned int result;
+ struct ipt_CHECKSUM_info *einfo
+ = (struct ipt_CHECKSUM_info *)(*target)->data;
+
+ switch (c) {
+ case 'F':
+ if (*flags)
+ xtables_error(PARAMETER_PROBLEM,
+ "CHECKSUM target: Only use --checksum-fill ONCE!");
+ einfo->operation = IPT_CHECKSUM_OP_FILL;
+ *flags |= IPT_CHECKSUM_OP_FILL;
+ break;
+ default:
+ return 0;
+ }
+
+ return 1;
+}
+
+static void CHECKSUM_check(unsigned int flags)
+{
+ if (!flags)
+ xtables_error(PARAMETER_PROBLEM,
+ "CHECKSUM target: Parameter --checksum-fill is required");
+}
+
+static void CHECKSUM_print(const void *ip, const struct xt_entry_target *target,
+ int numeric)
+{
+ const struct ipt_CHECKSUM_info *einfo =
+ (const struct ipt_CHECKSUM_info *)target->data;
+
+ printf("CHECKSUM ");
+
+ if (einfo->operation & IPT_CHECKSUM_OP_FILL)
+ printf("fill ");
+}
+
+static void CHECKSUM_save(const void *ip, const struct xt_entry_target *target)
+{
+ const struct ipt_CHECKSUM_info *einfo =
+ (const struct ipt_CHECKSUM_info *)target->data;
+
+ if (einfo->operation & IPT_CHECKSUM_OP_FILL)
+ printf("--checksum-fill ");
+}
+
+static struct xtables_target checksum_tg_reg = {
+ .name = "CHECKSUM",
+ .version = XTABLES_VERSION,
+ .family = NFPROTO_IPV4,
+ .size = XT_ALIGN(sizeof(struct ipt_CHECKSUM_info)),
+ .userspacesize = XT_ALIGN(sizeof(struct ipt_CHECKSUM_info)),
+ .help = CHECKSUM_help,
+ .parse = CHECKSUM_parse,
+ .final_check = CHECKSUM_check,
+ .print = CHECKSUM_print,
+ .save = CHECKSUM_save,
+ .extra_opts = CHECKSUM_opts,
+};
+
+void _init(void)
+{
+ xtables_register_target(&checksum_tg_reg);
+}
diff --git a/extensions/libipt_CHECKSUM.man b/extensions/libipt_CHECKSUM.man
new file mode 100644
index 0000000..4f83335
--- /dev/null
+++ b/extensions/libipt_CHECKSUM.man
@@ -0,0 +1,8 @@
+This target allows to selectively work around broken/old applications.
+It can only be used in the mangle table.
+.TP
+\fB\-\-checksum\-fill\fP
+Compute and fill in the checksum in an IP packet that lacks a checksum.
+This is particularly useful, if you need to work around old applications
+such as dhcp clients, that do not work well with checksum offloads,
+but don't want to disable checksum offload in your device.
--
1.7.2.rc0.14.g41c1c
^ permalink raw reply related
* Re: Pull request: bluetooth-2.6 2010-07-08
From: David Miller @ 2010-07-08 22:46 UTC (permalink / raw)
To: marcel; +Cc: netdev
In-Reply-To: <cover.1278619047.git.marcel@holtmann.org>
From: Marcel Holtmann <marcel@holtmann.org>
Date: Thu, 8 Jul 2010 16:59:49 -0300
> these patches fix a few bugs and crashes and also two security related
> issues with the authentication procedure.
13 changes is too much this late in the -RC series. Fixes need to
trickle in, in small quantities, and therefore it's critical that
maintainers submit fixes often and as soon as they are ready.
Please pick a small number of the most critical fixes, say 3 or 4. An
easy way to roughly quantify which ones shoule be included is:
1) Is there an OOPS or crash regression reported by real users and
listed in the official lkml regression list which is caused by this
problem?
2) Is there an exploitable security concern fixed by this change?
Else, it's only net-next-2.6 material.
For example:
Bluetooth: Remove max_tx and tx_window module paramenters from L2CAP
Things like that change are absolutely not appropriate at this
stage in the post merge-window development environment.
Thanks.
^ permalink raw reply
* Re: [PATCH] sysfs: Don't allow the creation of symlinks we can't remove
From: Greg KH @ 2010-07-08 23:06 UTC (permalink / raw)
To: Eric W. Biederman
Cc: Greg KH, Andrew Morton, Rafael J. Wysocki, Maciej W. Rozycki,
Kay Sievers, Johannes Berg, netdev
In-Reply-To: <m1r5jdbobe.fsf@fess.ebiederm.org>
On Thu, Jul 08, 2010 at 03:28:53PM -0700, Eric W. Biederman wrote:
> Greg KH <greg@kroah.com> writes:
>
> > With this patch, how does the existing code fail as the drivers aren't
> > fixed up?
> >
> > I like this change, just worried it will cause problems if it gets into
> > .35, without your RFC patch. Will it?
>
> It don't expect this patch to be worse than where we are current at.
> Network devices are renamed, and come and go enough that both the
> mac80211_hwsim and the bnep driver are currently unusable with a
> failure only the rename and remove.
>
> This patch simply moves the failure into creation where we are a little more
> prepared to deal with problems, and this patch is limited to mac80211_hwsim,
> bnep, and any hypothetically undiscovered other network devices that
> have the same problem.
>
> mac80211_hwsim with just this patch becomes somewhat usable as it's primary
> network device gets registered and the module can be loaded and unloaded. It
> just doesn't create the wlan0 and wlan1 interfaces for the wifi interfaces.
Fair enough, I've commited it now, let's see what happens :)
> On a slightly unrelated note, what got us on trying to convert
> mac80211_hwsim was that everything happens in a single module which
> makes avoiding cleanup races hard. I am hoping bnep is structured
> enough differently so we can convert it to a bus device using the
> existing infrastructure. I haven't figured out bnep yet though ;(
Yeah, good luck with that...
greg k-h
^ permalink raw reply
* Re: [PATCH 1/6 net-next-2.6] vxge: Remove queue_state references
From: Jon Mason @ 2010-07-08 23:19 UTC (permalink / raw)
To: David Miller; +Cc: netdev@vger.kernel.org, Sreenivasa Honnur, ramkrishna.vepa
In-Reply-To: <20100708191957.GA15167@exar.com>
On Thu, Jul 08, 2010 at 12:19:57PM -0700, Jon Mason wrote:
> Remove queue_state references, as they are no longer necessary.
>
> Also, The driver needs to start/stop the queue regardless of which type
> of steering is enabled. Remove checks for TX_MULTIQ_STEERING only and
> start/stop for all steering types.
>
> Signed-off-by: Jon Mason <jon.mason@exar.com>
> Signed-off-by: Sreenivasa Honnur <sreenivasa.honnur@exar.com>
> Signed-off-by: Ramkrishna Vepa <ram.vepa@exar.com>
Ram's e-mail address is incorrect in this series. Would you like me
to resubmit with it corrected?
Thanks,
Jon
> ---
> drivers/net/vxge/vxge-main.c | 118 +++++++++++++++---------------------------
> drivers/net/vxge/vxge-main.h | 10 +---
> 2 files changed, 42 insertions(+), 86 deletions(-)
>
> diff --git a/drivers/net/vxge/vxge-main.c b/drivers/net/vxge/vxge-main.c
> index ed17865..e78703d 100644
> --- a/drivers/net/vxge/vxge-main.c
> +++ b/drivers/net/vxge/vxge-main.c
> @@ -133,75 +133,48 @@ static inline void VXGE_COMPLETE_ALL_RX(struct vxgedev *vdev)
> /*
> * MultiQ manipulation helper functions
> */
> -void vxge_stop_all_tx_queue(struct vxgedev *vdev)
> +static inline int vxge_netif_queue_stopped(struct vxge_fifo *fifo)
> {
> - int i;
> - struct net_device *dev = vdev->ndev;
> + struct net_device *dev = fifo->ndev;
> + struct netdev_queue *txq = NULL;
> + int vpath_no = fifo->driver_id;
> + int ret = 0;
>
> - if (vdev->config.tx_steering_type != TX_MULTIQ_STEERING) {
> - for (i = 0; i < vdev->no_of_vpath; i++)
> - vdev->vpaths[i].fifo.queue_state = VPATH_QUEUE_STOP;
> - }
> - netif_tx_stop_all_queues(dev);
> + if (fifo->tx_steering_type)
> + txq = netdev_get_tx_queue(dev, vpath_no);
> + else
> + txq = netdev_get_tx_queue(dev, 0);
> +
> + ret = netif_tx_queue_stopped(txq);
> + return ret;
> }
>
> void vxge_stop_tx_queue(struct vxge_fifo *fifo)
> {
> struct net_device *dev = fifo->ndev;
> -
> struct netdev_queue *txq = NULL;
> - if (fifo->tx_steering_type == TX_MULTIQ_STEERING)
> +
> + if (fifo->tx_steering_type)
> txq = netdev_get_tx_queue(dev, fifo->driver_id);
> - else {
> + else
> txq = netdev_get_tx_queue(dev, 0);
> - fifo->queue_state = VPATH_QUEUE_STOP;
> - }
>
> netif_tx_stop_queue(txq);
> }
>
> -void vxge_start_all_tx_queue(struct vxgedev *vdev)
> -{
> - int i;
> - struct net_device *dev = vdev->ndev;
> -
> - if (vdev->config.tx_steering_type != TX_MULTIQ_STEERING) {
> - for (i = 0; i < vdev->no_of_vpath; i++)
> - vdev->vpaths[i].fifo.queue_state = VPATH_QUEUE_START;
> - }
> - netif_tx_start_all_queues(dev);
> -}
> -
> -static void vxge_wake_all_tx_queue(struct vxgedev *vdev)
> -{
> - int i;
> - struct net_device *dev = vdev->ndev;
> -
> - if (vdev->config.tx_steering_type != TX_MULTIQ_STEERING) {
> - for (i = 0; i < vdev->no_of_vpath; i++)
> - vdev->vpaths[i].fifo.queue_state = VPATH_QUEUE_START;
> - }
> - netif_tx_wake_all_queues(dev);
> -}
> -
> -void vxge_wake_tx_queue(struct vxge_fifo *fifo, struct sk_buff *skb)
> +void vxge_wake_tx_queue(struct vxge_fifo *fifo)
> {
> struct net_device *dev = fifo->ndev;
> -
> - int vpath_no = fifo->driver_id;
> struct netdev_queue *txq = NULL;
> - if (fifo->tx_steering_type == TX_MULTIQ_STEERING) {
> + int vpath_no = fifo->driver_id;
> +
> + if (fifo->tx_steering_type)
> txq = netdev_get_tx_queue(dev, vpath_no);
> - if (netif_tx_queue_stopped(txq))
> - netif_tx_wake_queue(txq);
> - } else {
> + else
> txq = netdev_get_tx_queue(dev, 0);
> - if (fifo->queue_state == VPATH_QUEUE_STOP)
> - if (netif_tx_queue_stopped(txq)) {
> - fifo->queue_state = VPATH_QUEUE_START;
> - netif_tx_wake_queue(txq);
> - }
> - }
> +
> + if (netif_tx_queue_stopped(txq))
> + netif_tx_wake_queue(txq);
> }
>
> /*
> @@ -222,7 +195,7 @@ vxge_callback_link_up(struct __vxge_hw_device *hldev)
> vdev->stats.link_up++;
>
> netif_carrier_on(vdev->ndev);
> - vxge_wake_all_tx_queue(vdev);
> + netif_tx_wake_all_queues(vdev->ndev);
>
> vxge_debug_entryexit(VXGE_TRACE,
> "%s: %s:%d Exiting...", vdev->ndev->name, __func__, __LINE__);
> @@ -246,7 +219,7 @@ vxge_callback_link_down(struct __vxge_hw_device *hldev)
>
> vdev->stats.link_down++;
> netif_carrier_off(vdev->ndev);
> - vxge_stop_all_tx_queue(vdev);
> + netif_tx_stop_all_queues(vdev->ndev);
>
> vxge_debug_entryexit(VXGE_TRACE,
> "%s: %s:%d Exiting...", vdev->ndev->name, __func__, __LINE__);
> @@ -677,7 +650,7 @@ vxge_xmit_compl(struct __vxge_hw_fifo *fifo_hw, void *dtr,
> &dtr, &t_code) == VXGE_HW_OK);
>
> *skb_ptr = done_skb;
> - vxge_wake_tx_queue(fifo, skb);
> + vxge_wake_tx_queue(fifo);
>
> vxge_debug_entryexit(VXGE_TRACE,
> "%s: %s:%d Exiting...",
> @@ -881,17 +854,11 @@ vxge_xmit(struct sk_buff *skb, struct net_device *dev)
> return NETDEV_TX_LOCKED;
> }
>
> - if (vdev->config.tx_steering_type == TX_MULTIQ_STEERING) {
> - if (netif_subqueue_stopped(dev, skb)) {
> - spin_unlock_irqrestore(&fifo->tx_lock, flags);
> - return NETDEV_TX_BUSY;
> - }
> - } else if (unlikely(fifo->queue_state == VPATH_QUEUE_STOP)) {
> - if (netif_queue_stopped(dev)) {
> - spin_unlock_irqrestore(&fifo->tx_lock, flags);
> - return NETDEV_TX_BUSY;
> - }
> + if (vxge_netif_queue_stopped(fifo)) {
> + spin_unlock_irqrestore(&fifo->tx_lock, flags);
> + return NETDEV_TX_BUSY;
> }
> +
> avail = vxge_hw_fifo_free_txdl_count_get(fifo_hw);
> if (avail == 0) {
> vxge_debug_tx(VXGE_ERR,
> @@ -1478,7 +1445,7 @@ static int vxge_reset_vpath(struct vxgedev *vdev, int vp_id)
> clear_bit(vp_id, &vdev->vp_reset);
>
> /* Start the vpath queue */
> - vxge_wake_tx_queue(&vdev->vpaths[vp_id].fifo, NULL);
> + vxge_wake_tx_queue(&vdev->vpaths[vp_id].fifo);
>
> return ret;
> }
> @@ -1513,7 +1480,7 @@ static int do_vxge_reset(struct vxgedev *vdev, int event)
> "%s: execution mode is debug, returning..",
> vdev->ndev->name);
> clear_bit(__VXGE_STATE_CARD_UP, &vdev->state);
> - vxge_stop_all_tx_queue(vdev);
> + netif_tx_stop_all_queues(vdev->ndev);
> return 0;
> }
> }
> @@ -1523,7 +1490,7 @@ static int do_vxge_reset(struct vxgedev *vdev, int event)
>
> switch (vdev->cric_err_event) {
> case VXGE_HW_EVENT_UNKNOWN:
> - vxge_stop_all_tx_queue(vdev);
> + netif_tx_stop_all_queues(vdev->ndev);
> vxge_debug_init(VXGE_ERR,
> "fatal: %s: Disabling device due to"
> "unknown error",
> @@ -1544,7 +1511,7 @@ static int do_vxge_reset(struct vxgedev *vdev, int event)
> case VXGE_HW_EVENT_VPATH_ERR:
> break;
> case VXGE_HW_EVENT_CRITICAL_ERR:
> - vxge_stop_all_tx_queue(vdev);
> + netif_tx_stop_all_queues(vdev->ndev);
> vxge_debug_init(VXGE_ERR,
> "fatal: %s: Disabling device due to"
> "serious error",
> @@ -1554,7 +1521,7 @@ static int do_vxge_reset(struct vxgedev *vdev, int event)
> ret = -EPERM;
> goto out;
> case VXGE_HW_EVENT_SERR:
> - vxge_stop_all_tx_queue(vdev);
> + netif_tx_stop_all_queues(vdev->ndev);
> vxge_debug_init(VXGE_ERR,
> "fatal: %s: Disabling device due to"
> "serious error",
> @@ -1566,7 +1533,7 @@ static int do_vxge_reset(struct vxgedev *vdev, int event)
> ret = -EPERM;
> goto out;
> case VXGE_HW_EVENT_SLOT_FREEZE:
> - vxge_stop_all_tx_queue(vdev);
> + netif_tx_stop_all_queues(vdev->ndev);
> vxge_debug_init(VXGE_ERR,
> "fatal: %s: Disabling device due to"
> "slot freeze",
> @@ -1580,7 +1547,7 @@ static int do_vxge_reset(struct vxgedev *vdev, int event)
> }
>
> if ((event == VXGE_LL_FULL_RESET) || (event == VXGE_LL_START_RESET))
> - vxge_stop_all_tx_queue(vdev);
> + netif_tx_stop_all_queues(vdev->ndev);
>
> if (event == VXGE_LL_FULL_RESET) {
> status = vxge_reset_all_vpaths(vdev);
> @@ -1640,7 +1607,7 @@ static int do_vxge_reset(struct vxgedev *vdev, int event)
> vxge_hw_vpath_rx_doorbell_init(vdev->vpaths[i].handle);
> }
>
> - vxge_wake_all_tx_queue(vdev);
> + netif_tx_wake_all_queues(vdev->ndev);
> }
>
> out:
> @@ -2779,7 +2746,7 @@ vxge_open(struct net_device *dev)
> vxge_hw_vpath_rx_doorbell_init(vdev->vpaths[i].handle);
> }
>
> - vxge_start_all_tx_queue(vdev);
> + netif_tx_start_all_queues(vdev->ndev);
> goto out0;
>
> out2:
> @@ -2902,7 +2869,7 @@ int do_vxge_close(struct net_device *dev, int do_io)
>
> netif_carrier_off(vdev->ndev);
> printk(KERN_NOTICE "%s: Link Down\n", vdev->ndev->name);
> - vxge_stop_all_tx_queue(vdev);
> + netif_tx_stop_all_queues(vdev->ndev);
>
> /* Note that at this point xmit() is stopped by upper layer */
> if (do_io)
> @@ -3215,7 +3182,7 @@ int __devinit vxge_device_register(struct __vxge_hw_device *hldev,
> u64 stat;
>
> *vdev_out = NULL;
> - if (config->tx_steering_type == TX_MULTIQ_STEERING)
> + if (config->tx_steering_type)
> no_of_queue = no_of_vpath;
>
> ndev = alloc_etherdev_mq(sizeof(struct vxgedev),
> @@ -3284,9 +3251,6 @@ int __devinit vxge_device_register(struct __vxge_hw_device *hldev,
> if (vdev->config.gro_enable)
> ndev->features |= NETIF_F_GRO;
>
> - if (vdev->config.tx_steering_type == TX_MULTIQ_STEERING)
> - ndev->real_num_tx_queues = no_of_vpath;
> -
> #ifdef NETIF_F_LLTX
> ndev->features |= NETIF_F_LLTX;
> #endif
> diff --git a/drivers/net/vxge/vxge-main.h b/drivers/net/vxge/vxge-main.h
> index 60276b2..a384582 100644
> --- a/drivers/net/vxge/vxge-main.h
> +++ b/drivers/net/vxge/vxge-main.h
> @@ -228,10 +228,6 @@ struct vxge_fifo {
> int tx_steering_type;
> int indicate_max_pkts;
> spinlock_t tx_lock;
> - /* flag used to maintain queue state when MULTIQ is not enabled */
> -#define VPATH_QUEUE_START 0
> -#define VPATH_QUEUE_STOP 1
> - int queue_state;
>
> /* Tx stats */
> struct vxge_fifo_stats stats;
> @@ -447,13 +443,9 @@ int vxge_open_vpaths(struct vxgedev *vdev);
>
> enum vxge_hw_status vxge_reset_all_vpaths(struct vxgedev *vdev);
>
> -void vxge_stop_all_tx_queue(struct vxgedev *vdev);
> -
> void vxge_stop_tx_queue(struct vxge_fifo *fifo);
>
> -void vxge_start_all_tx_queue(struct vxgedev *vdev);
> -
> -void vxge_wake_tx_queue(struct vxge_fifo *fifo, struct sk_buff *skb);
> +void vxge_wake_tx_queue(struct vxge_fifo *fifo);
>
> enum vxge_hw_status vxge_add_mac_addr(struct vxgedev *vdev,
> struct macInfo *mac);
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Re: Pull request: bluetooth-2.6 2010-07-08
From: Marcel Holtmann @ 2010-07-08 23:28 UTC (permalink / raw)
To: David Miller; +Cc: netdev
In-Reply-To: <20100708.154637.71104736.davem@davemloft.net>
Hi Dave,
> > these patches fix a few bugs and crashes and also two security related
> > issues with the authentication procedure.
>
> 13 changes is too much this late in the -RC series. Fixes need to
> trickle in, in small quantities, and therefore it's critical that
> maintainers submit fixes often and as soon as they are ready.
>
> Please pick a small number of the most critical fixes, say 3 or 4. An
> easy way to roughly quantify which ones shoule be included is:
>
> 1) Is there an OOPS or crash regression reported by real users and
> listed in the official lkml regression list which is caused by this
> problem?
>
> 2) Is there an exploitable security concern fixed by this change?
>
> Else, it's only net-next-2.6 material.
>
> For example:
>
> Bluetooth: Remove max_tx and tx_window module paramenters from L2CAP
>
> Things like that change are absolutely not appropriate at this
> stage in the post merge-window development environment.
I can take these out and leave them for -next. That is fine with me, but
you asked Gustavo to remove these. And so I left them in.
Regards
Marcel
^ permalink raw reply
* [PATCH net-next-2.6 1/2] net: Get rid of rtnl_link_stats64 / net_device_stats union
From: Ben Hutchings @ 2010-07-08 23:29 UTC (permalink / raw)
To: David Miller; +Cc: netdev, linux-net-drivers, Eric Dumazet
In commit be1f3c2c027cc5ad735df6a45a542ed1db7ec48b "net: Enable 64-bit
net device statistics on 32-bit architectures" I redefined struct
net_device_stats so that it could be used in a union with struct
rtnl_link_stats64, avoiding the need for explicit copying or
conversion between the two. However, this is unsafe because there is
no locking required and no lock consistently held around calls to
dev_get_stats() and use of the statistics structure it returns.
In commit 28172739f0a276eb8d6ca917b3974c2edb036da3 "net: fix 64 bit
counters on 32 bit arches" Eric Dumazet dealt with that problem by
requiring callers of dev_get_stats() to provide storage for the
result. This means that the net_device::stats64 field and the padding
in struct net_device_stats are now redundant, so remove them.
Update the comment on net_device_ops::ndo_get_stats64 to reflect its
new usage.
Change dev_txq_stats_fold() to use struct rtnl_link_stats64, since
that is what all its callers are really using and it is no longer
going to be compatible with struct net_device_stats.
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
---
drivers/net/macvlan.c | 2 +-
include/linux/netdevice.h | 70 ++++++++++++++++++---------------------------
net/8021q/vlan_dev.c | 2 +-
net/core/dev.c | 19 +++++++++---
4 files changed, 44 insertions(+), 49 deletions(-)
diff --git a/drivers/net/macvlan.c b/drivers/net/macvlan.c
index 6112f14..1b28aae 100644
--- a/drivers/net/macvlan.c
+++ b/drivers/net/macvlan.c
@@ -436,7 +436,7 @@ static struct rtnl_link_stats64 *macvlan_dev_get_stats64(struct net_device *dev,
{
struct macvlan_dev *vlan = netdev_priv(dev);
- dev_txq_stats_fold(dev, (struct net_device_stats *)stats);
+ dev_txq_stats_fold(dev, stats);
if (vlan->rx_stats) {
struct macvlan_rx_stats *p, accum = {0};
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 8018f6b..17e95e3 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -162,42 +162,32 @@ static inline bool dev_xmit_complete(int rc)
/*
* Old network device statistics. Fields are native words
* (unsigned long) so they can be read and written atomically.
- * Each field is padded to 64 bits for compatibility with
- * rtnl_link_stats64.
*/
-#if BITS_PER_LONG == 64
-#define NET_DEVICE_STATS_DEFINE(name) unsigned long name
-#elif defined(__LITTLE_ENDIAN)
-#define NET_DEVICE_STATS_DEFINE(name) unsigned long name, pad_ ## name
-#else
-#define NET_DEVICE_STATS_DEFINE(name) unsigned long pad_ ## name, name
-#endif
-
struct net_device_stats {
- NET_DEVICE_STATS_DEFINE(rx_packets);
- NET_DEVICE_STATS_DEFINE(tx_packets);
- NET_DEVICE_STATS_DEFINE(rx_bytes);
- NET_DEVICE_STATS_DEFINE(tx_bytes);
- NET_DEVICE_STATS_DEFINE(rx_errors);
- NET_DEVICE_STATS_DEFINE(tx_errors);
- NET_DEVICE_STATS_DEFINE(rx_dropped);
- NET_DEVICE_STATS_DEFINE(tx_dropped);
- NET_DEVICE_STATS_DEFINE(multicast);
- NET_DEVICE_STATS_DEFINE(collisions);
- NET_DEVICE_STATS_DEFINE(rx_length_errors);
- NET_DEVICE_STATS_DEFINE(rx_over_errors);
- NET_DEVICE_STATS_DEFINE(rx_crc_errors);
- NET_DEVICE_STATS_DEFINE(rx_frame_errors);
- NET_DEVICE_STATS_DEFINE(rx_fifo_errors);
- NET_DEVICE_STATS_DEFINE(rx_missed_errors);
- NET_DEVICE_STATS_DEFINE(tx_aborted_errors);
- NET_DEVICE_STATS_DEFINE(tx_carrier_errors);
- NET_DEVICE_STATS_DEFINE(tx_fifo_errors);
- NET_DEVICE_STATS_DEFINE(tx_heartbeat_errors);
- NET_DEVICE_STATS_DEFINE(tx_window_errors);
- NET_DEVICE_STATS_DEFINE(rx_compressed);
- NET_DEVICE_STATS_DEFINE(tx_compressed);
+ unsigned long rx_packets;
+ unsigned long tx_packets;
+ unsigned long rx_bytes;
+ unsigned long tx_bytes;
+ unsigned long rx_errors;
+ unsigned long tx_errors;
+ unsigned long rx_dropped;
+ unsigned long tx_dropped;
+ unsigned long multicast;
+ unsigned long collisions;
+ unsigned long rx_length_errors;
+ unsigned long rx_over_errors;
+ unsigned long rx_crc_errors;
+ unsigned long rx_frame_errors;
+ unsigned long rx_fifo_errors;
+ unsigned long rx_missed_errors;
+ unsigned long tx_aborted_errors;
+ unsigned long tx_carrier_errors;
+ unsigned long tx_fifo_errors;
+ unsigned long tx_heartbeat_errors;
+ unsigned long tx_window_errors;
+ unsigned long rx_compressed;
+ unsigned long tx_compressed;
};
#endif /* __KERNEL__ */
@@ -666,14 +656,13 @@ struct netdev_rx_queue {
* Callback uses when the transmitter has not made any progress
* for dev->watchdog ticks.
*
- * struct rtnl_link_stats64* (*ndo_get_stats64)(struct net_device *dev
+ * struct rtnl_link_stats64* (*ndo_get_stats64)(struct net_device *dev,
* struct rtnl_link_stats64 *storage);
* struct net_device_stats* (*ndo_get_stats)(struct net_device *dev);
* Called when a user wants to get the network device usage
* statistics. Drivers must do one of the following:
- * 1. Define @ndo_get_stats64 to update a rtnl_link_stats64 structure
- * (which should normally be dev->stats64) and return a ponter to
- * it. The structure must not be changed asynchronously.
+ * 1. Define @ndo_get_stats64 to fill in a zero-initialised
+ * rtnl_link_stats64 structure passed by the caller.
* 2. Define @ndo_get_stats to update a net_device_stats structure
* (which should normally be dev->stats) and return a pointer to
* it. The structure may be changed asynchronously only if each
@@ -888,10 +877,7 @@ struct net_device {
int ifindex;
int iflink;
- union {
- struct rtnl_link_stats64 stats64;
- struct net_device_stats stats;
- };
+ struct net_device_stats stats;
#ifdef CONFIG_WIRELESS_EXT
/* List of functions to handle Wireless Extensions (instead of ioctl).
@@ -2147,7 +2133,7 @@ extern void dev_mcast_init(void);
extern const struct rtnl_link_stats64 *dev_get_stats(struct net_device *dev,
struct rtnl_link_stats64 *storage);
extern void dev_txq_stats_fold(const struct net_device *dev,
- struct net_device_stats *stats);
+ struct rtnl_link_stats64 *stats);
extern int netdev_max_backlog;
extern int netdev_tstamp_prequeue;
diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c
index 7865a4c..e66c9bf 100644
--- a/net/8021q/vlan_dev.c
+++ b/net/8021q/vlan_dev.c
@@ -805,7 +805,7 @@ static u32 vlan_ethtool_get_flags(struct net_device *dev)
static struct rtnl_link_stats64 *vlan_dev_get_stats64(struct net_device *dev, struct rtnl_link_stats64 *stats)
{
- dev_txq_stats_fold(dev, (struct net_device_stats *)stats);
+ dev_txq_stats_fold(dev, stats);
if (vlan_dev_info(dev)->vlan_rx_stats) {
struct vlan_rx_stats *p, accum = {0};
diff --git a/net/core/dev.c b/net/core/dev.c
index eb4201c..5ec2eec 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -5274,10 +5274,10 @@ void netdev_run_todo(void)
/**
* dev_txq_stats_fold - fold tx_queues stats
* @dev: device to get statistics from
- * @stats: struct net_device_stats to hold results
+ * @stats: struct rtnl_link_stats64 to hold results
*/
void dev_txq_stats_fold(const struct net_device *dev,
- struct net_device_stats *stats)
+ struct rtnl_link_stats64 *stats)
{
unsigned long tx_bytes = 0, tx_packets = 0, tx_dropped = 0;
unsigned int i;
@@ -5311,17 +5311,26 @@ const struct rtnl_link_stats64 *dev_get_stats(struct net_device *dev,
struct rtnl_link_stats64 *storage)
{
const struct net_device_ops *ops = dev->netdev_ops;
+ size_t i, n = sizeof(*storage) / sizeof(u64);
+ u64 *stats64 = (u64 *)storage;
+ const unsigned long *stats;
if (ops->ndo_get_stats64) {
memset(storage, 0, sizeof(*storage));
return ops->ndo_get_stats64(dev, storage);
}
+
if (ops->ndo_get_stats) {
- memcpy(storage, ops->ndo_get_stats(dev), sizeof(*storage));
+ stats = (const unsigned long *)ops->ndo_get_stats(dev);
+ for (i = 0; i < n; i++)
+ stats64[i] = stats[i];
return storage;
}
- memcpy(storage, &dev->stats, sizeof(*storage));
- dev_txq_stats_fold(dev, (struct net_device_stats *)storage);
+
+ stats = (const unsigned long *)&dev->stats;
+ for (i = 0; i < n; i++)
+ stats64[i] = stats[i];
+ dev_txq_stats_fold(dev, storage);
return storage;
}
EXPORT_SYMBOL(dev_get_stats);
--
1.6.2.5
--
Ben Hutchings, Senior Software Engineer, Solarflare Communications
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
^ permalink raw reply related
* [PATCH net-next-2.6 2/2] net: Document that dev_get_stats() returns the given pointer
From: Ben Hutchings @ 2010-07-08 23:30 UTC (permalink / raw)
To: David Miller; +Cc: netdev, linux-net-drivers, Eric Dumazet
In-Reply-To: <1278631762.16013.307.camel@achroite.uk.solarflarecom.com>
Document that dev_get_stats() returns the same stats pointer it was
given. Remove const qualification from the returned pointer since the
caller may do what it likes with that structure.
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
---
include/linux/netdevice.h | 4 ++--
net/core/dev.c | 12 ++++++------
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 17e95e3..c4fedf0 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -2130,8 +2130,8 @@ extern void netdev_features_change(struct net_device *dev);
/* Load a device via the kmod */
extern void dev_load(struct net *net, const char *name);
extern void dev_mcast_init(void);
-extern const struct rtnl_link_stats64 *dev_get_stats(struct net_device *dev,
- struct rtnl_link_stats64 *storage);
+extern struct rtnl_link_stats64 *dev_get_stats(struct net_device *dev,
+ struct rtnl_link_stats64 *storage);
extern void dev_txq_stats_fold(const struct net_device *dev,
struct rtnl_link_stats64 *stats);
diff --git a/net/core/dev.c b/net/core/dev.c
index 5ec2eec..2605a68 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -5302,13 +5302,13 @@ EXPORT_SYMBOL(dev_txq_stats_fold);
* @dev: device to get statistics from
* @storage: place to store stats
*
- * Get network statistics from device. The device driver may provide
- * its own method by setting dev->netdev_ops->get_stats64 or
- * dev->netdev_ops->get_stats; otherwise the internal statistics
- * structure is used.
+ * Get network statistics from device. Return @storage.
+ * The device driver may provide its own method by setting
+ * dev->netdev_ops->get_stats64 or dev->netdev_ops->get_stats;
+ * otherwise the internal statistics structure is used.
*/
-const struct rtnl_link_stats64 *dev_get_stats(struct net_device *dev,
- struct rtnl_link_stats64 *storage)
+struct rtnl_link_stats64 *dev_get_stats(struct net_device *dev,
+ struct rtnl_link_stats64 *storage)
{
const struct net_device_ops *ops = dev->netdev_ops;
size_t i, n = sizeof(*storage) / sizeof(u64);
--
1.6.2.5
--
Ben Hutchings, Senior Software Engineer, Solarflare Communications
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
^ permalink raw reply related
* 2.6.35-rc4-git3: Reported regressions from 2.6.34
From: Rafael J. Wysocki @ 2010-07-08 23:33 UTC (permalink / raw)
To: Linux Kernel Mailing List
Cc: Maciej Rutecki, Andrew Morton, Linus Torvalds,
Kernel Testers List, Network Development, Linux ACPI,
Linux PM List, Linux SCSI List, Linux Wireless List, DRI
This message contains a list of some regressions from 2.6.34,
for which there are no fixes in the mainline known to the tracking team.
If any of them have been fixed already, please let us know.
If you know of any other unresolved regressions from 2.6.34, please let us
know either and we'll add them to the list. Also, please let us know
if any of the entries below are invalid.
Each entry from the list will be sent additionally in an automatic reply
to this message with CCs to the people involved in reporting and handling
the issue.
Listed regressions statistics:
Date Total Pending Unresolved
----------------------------------------
2010-07-09 79 45 37
2010-06-21 46 37 26
2010-06-09 15 13 10
Unresolved regressions
----------------------
Bug-Entry : http://bugzilla.kernel.org/show_bug.cgi?id=16353
Subject : 2.6.35 regression
Submitter : Zeev Tarantov <zeev.tarantov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Date : 2010-07-05 13:04 (4 days old)
Message-ID : <loom.20100705T144459-919-eS7Uydv5nfjZ+VzJOa5vwg@public.gmane.org>
References : http://marc.info/?l=linux-kernel&m=127836002702522&w=2
Bug-Entry : http://bugzilla.kernel.org/show_bug.cgi?id=16346
Subject : 2.6.35-rc3-git8 - include/linux/fdtable.h:88 invoked rcu_dereference_check() without protection!
Submitter : Miles Lane <miles.lane-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Date : 2010-07-04 22:04 (5 days old)
Message-ID : <AANLkTinof0k28rk4rMr66aubxcRL2rFa5ZEArj1lqD3o-JsoAwUIsXotQFR93xxRIaA@public.gmane.orgcom>
References : http://marc.info/?l=linux-kernel&m=127828107815930&w=2
Bug-Entry : http://bugzilla.kernel.org/show_bug.cgi?id=16337
Subject : general protection fault: 0000 [#1] SMP
Submitter : Justin P. Mattock <justinmattock-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Date : 2010-07-03 22:59 (6 days old)
Message-ID : <4C2FC0E3.6050101-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
References : http://marc.info/?l=linux-kernel&m=127819798215589&w=2
Bug-Entry : http://bugzilla.kernel.org/show_bug.cgi?id=16334
Subject : reiserfs locking (v2)
Submitter : Sergey Senozhatsky <sergey.senozhatsky-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Date : 2010-07-02 9:34 (7 days old)
Message-ID : <20100702093451.GA3973-dY8u8AhHFaWtd10JCjopabkcH5ONE+aC@public.gmane.org>
References : http://marc.info/?l=linux-kernel&m=127806306303590&w=2
Bug-Entry : http://bugzilla.kernel.org/show_bug.cgi?id=16333
Subject : iwl3945: HARDWARE GONE??
Submitter : Priit Laes <plaes-q/aMd4JkU83YtjvyW6yDsg@public.gmane.org>
Date : 2010-07-02 16:02 (7 days old)
Message-ID : <1278086575.2889.8.camel@chi>
References : http://marc.info/?l=linux-kernel&m=127808659705983&w=2
Bug-Entry : http://bugzilla.kernel.org/show_bug.cgi?id=16332
Subject : Kernel crashes in tty code (tty_open)
Submitter : werner-K1X7VnsBORrsrOwW+9ziJQ@public.gmane.org
Date : 2010-07-02 3:34 (7 days old)
Message-ID : <1278041650.12788-K1X7VnsBORrsrOwW+9ziJQ@public.gmane.org>
References : http://marc.info/?l=linux-kernel&m=127804167511930&w=2
Bug-Entry : http://bugzilla.kernel.org/show_bug.cgi?id=16330
Subject : Dynamic Debug broken on 2.6.35-rc3?
Submitter : Thomas Renninger <trenn-l3A5Bk7waGM@public.gmane.org>
Date : 2010-07-01 15:44 (8 days old)
Message-ID : <201007011744.19564.trenn-l3A5Bk7waGM@public.gmane.org>
References : http://marc.info/?l=linux-kernel&m=127799907218877&w=2
Bug-Entry : http://bugzilla.kernel.org/show_bug.cgi?id=16329
Subject : 2.6.35-rc3: Load average climbing to 3+ with no apparent reason: CPU 98% idle, with hardly no I/O
Submitter : Török Edwin <edwintorok-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Date : 2010-07-01 7:40 (8 days old)
Message-ID : <20100701104022.404410d6@debian>
References : http://marc.info/?l=linux-kernel&m=127797005030536&w=2
Bug-Entry : http://bugzilla.kernel.org/show_bug.cgi?id=16324
Subject : Oops while running fs_racer test on a POWER6 box against latest git
Submitter : divya <dipraksh-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
Date : 2010-06-30 11:34 (9 days old)
Message-ID : <4C2B28F3.7000006-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
References : http://marc.info/?l=linux-kernel&m=127789697303061&w=2
Bug-Entry : http://bugzilla.kernel.org/show_bug.cgi?id=16323
Subject : 2.6.35-rc3-git4 - kernel/sched.c:616 invoked rcu_dereference_check() without protection!
Submitter : Miles Lane <miles.lane-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Date : 2010-07-01 12:21 (8 days old)
Message-ID : <AANLkTini6hz2LFeZi8CMUmY3xw1MU7NxmyesuxZ4oCdo-JsoAwUIsXotQFR93xxRIaA@public.gmane.orgcom>
References : http://marc.info/?l=linux-kernel&m=127798693125541&w=2
Bug-Entry : http://bugzilla.kernel.org/show_bug.cgi?id=16322
Subject : WARNING: at /arch/x86/include/asm/processor.h:1005 read_measured_perf_ctrs+0x5a/0x70()
Submitter : boris64 <bugzilla.kernel.org-ro/BP3KN3ujR7s880joybQ@public.gmane.org>
Date : 2010-07-01 13:54 (8 days old)
Handled-By : H. Peter Anvin <hpa-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org>
Bug-Entry : http://bugzilla.kernel.org/show_bug.cgi?id=16312
Subject : WARNING: at fs/fs-writeback.c:1127 __mark_inode_dirty
Submitter : Zdenek Kabelac <zdenek.kabelac-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Date : 2010-06-28 9:40 (11 days old)
Message-ID : <AANLkTin24fr5O4_q5Xbo9Y_NKkEmtcp6Hgmr9_4qXaFz-JsoAwUIsXotQFR93xxRIaA@public.gmane.orgcom>
References : http://marc.info/?l=linux-kernel&m=127771804806465&w=2
Bug-Entry : http://bugzilla.kernel.org/show_bug.cgi?id=16311
Subject : [REGRESSION][SUSPEND] 2.6.35-rcX won't suspend Lenovo W500 laptop
Submitter : Shawn Starr <shawn.starr-bJEeYj9oJeDQT0dZR+AlfA@public.gmane.org>
Date : 2010-06-28 0:45 (11 days old)
Message-ID : <201006272045.17004.shawn.starr-bJEeYj9oJeDQT0dZR+AlfA@public.gmane.org>
References : http://marc.info/?l=linux-kernel&m=127768633705286&w=2
Bug-Entry : http://bugzilla.kernel.org/show_bug.cgi?id=16309
Subject : 2.6.35-rc3 oops trying to suspend.
Submitter : Andrew Hendry <andrew.hendry-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Date : 2010-06-27 12:40 (12 days old)
Message-ID : <AANLkTinUH2p33-AWxOVDrLsNkn9rgEVrlwn5mfK7P8NH-JsoAwUIsXotQFR93xxRIaA@public.gmane.orgcom>
References : http://marc.info/?l=linux-kernel&m=127764249926781&w=2
Bug-Entry : http://bugzilla.kernel.org/show_bug.cgi?id=16307
Subject : i915 in kernel 2.6.35-rc3, high number of wakeups
Submitter : Enrico Bandiello <enban-c0jvKHQHzSzx4jp4WZvp5g@public.gmane.org>
Date : 2010-06-26 16:57 (13 days old)
Message-ID : <4C26317A.5070309-c0jvKHQHzSzx4jp4WZvp5g@public.gmane.org>
References : http://marc.info/?l=linux-kernel&m=127757403404259&w=2
Bug-Entry : http://bugzilla.kernel.org/show_bug.cgi?id=16306
Subject : 2.6.35-rc3 BUG: unable to handle kernel NULL pointer dereference at 0000000000000048 cifs_show_options
Submitter : Andrew Hendry <andrew.hendry-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Date : 2010-06-26 10:46 (13 days old)
Message-ID : <AANLkTilhTrEBYZd4HxeXQk8B6-yV8rCJ2C0jXsEREgIR-JsoAwUIsXotQFR93xxRIaA@public.gmane.orgcom>
References : http://marc.info/?l=linux-kernel&m=127754922110501&w=2
Handled-By : Jeff Layton <jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Bug-Entry : http://bugzilla.kernel.org/show_bug.cgi?id=16304
Subject : i915 - high number of wakeups
Submitter : Enrico Bandiello <enban-c0jvKHQHzSzx4jp4WZvp5g@public.gmane.org>
Date : 2010-06-27 09:52 (12 days old)
Bug-Entry : http://bugzilla.kernel.org/show_bug.cgi?id=16294
Subject : [Q35 bisected] hang at init of i915 driver
Submitter : Kees Cook <kees-oSa+0FWJbaXR7s880joybQ@public.gmane.org>
Date : 2010-06-25 18:20 (14 days old)
First-Bad-Commit: http://git.kernel.org/linus/f1befe71fa7a79ab733011b045639d8d809924ad
Bug-Entry : http://bugzilla.kernel.org/show_bug.cgi?id=16288
Subject : kernel panic with iwlagn for Intel Wifi Link 5100
Submitter : <yanshuang.zheng-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Date : 2010-06-25 08:14 (14 days old)
Handled-By : Reinette Chatre <reinette.chatre-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Bug-Entry : http://bugzilla.kernel.org/show_bug.cgi?id=16284
Subject : Hitting WARN_ON in hw_breakpoint code
Submitter : Paul Mackerras <paulus-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org>
Date : 2010-06-23 12:57 (16 days old)
Message-ID : <20100623125740.GA3368-oklZEfemRj05kJ7NmlRacFaTQe2KTcn/@public.gmane.org>
References : http://marc.info/?l=linux-kernel&m=127729789113432&w=2
Bug-Entry : http://bugzilla.kernel.org/show_bug.cgi?id=16265
Subject : Why is kslowd accumulating so much CPU time?
Submitter : Theodore Ts'o <tytso-3s7WtUTddSA@public.gmane.org>
Date : 2010-06-09 18:36 (30 days old)
First-Bad-Commit: http://git.kernel.org/linus/fbf81762e385d3d45acad057b654d56972acf58c
Message-ID : <E1OMQ88-0002a1-Gb-UK71uKi2zisAobODsErMgNi2O/JbrIOy@public.gmane.org>
References : http://marc.info/?l=linux-kernel&m=127610857819033&w=4
Bug-Entry : http://bugzilla.kernel.org/show_bug.cgi?id=16257
Subject : sysfs changes break hwsim and bnep drivers
Submitter : Johannes Berg <johannes-cdvu00un1VgdHxzADdlk8Q@public.gmane.org>
Date : 2010-06-20 11:23 (19 days old)
References : http://thread.gmane.org/gmane.linux.network/162754
Handled-By : Eric W. Biederman <ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org>
Kay Sievers <kay.sievers-tD+1rO4QERM@public.gmane.org>
Bug-Entry : http://bugzilla.kernel.org/show_bug.cgi?id=16234
Subject : [2.6.35-rc3] reboot mutex 'bug'...
Submitter : Daniel J Blueman <daniel.blueman-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Date : 2010-06-14 15:16 (25 days old)
Message-ID : <AANLkTimDcTnyEPmt2ZcCM1UWtn4AYKotiqyjobJApkO7-JsoAwUIsXotQFR93xxRIaA@public.gmane.orgcom>
References : http://marc.info/?l=linux-kernel&m=127652861118933&w=2
Bug-Entry : http://bugzilla.kernel.org/show_bug.cgi?id=16230
Subject : inconsistent IN-HARDIRQ-W -> HARDIRQ-ON-W usage: fasync, 2.6.35-rc3
Submitter : Dominik Brodowski <linux-X3ehHDuj6sIIGcDfoQAp7OTW4wlIGRCZ@public.gmane.org>
Date : 2010-06-13 9:53 (26 days old)
Message-ID : <20100613095305.GA13231-S7uyTPAaJ/sb6pqDj42GsMgv3T4z79SOrE5yTffgRl4@public.gmane.org>
References : http://marc.info/?l=linux-kernel&m=127642282208277&w=2
Bug-Entry : http://bugzilla.kernel.org/show_bug.cgi?id=16228
Subject : BUG/boot failure on Dell Precision T3500 (pci/ahci_stop_engine)
Submitter : Brian Bloniarz <phunge0-PkbjNfxxIARBDgjK7y7TUQ@public.gmane.org>
Date : 2010-06-16 17:57 (23 days old)
Handled-By : Bjorn Helgaas <bjorn.helgaas-VXdhtT5mjnY@public.gmane.org>
Bug-Entry : http://bugzilla.kernel.org/show_bug.cgi?id=16221
Subject : 2.6.35-rc2-git5 -- [drm:drm_mode_getfb] *ERROR* invalid framebuffer id
Submitter : Miles Lane <miles.lane-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Date : 2010-06-11 20:31 (28 days old)
Message-ID : <AANLkTim0jVRyqkwlGOcrg_XTvUQwcBYfWJX-aRzkkrLG-JsoAwUIsXotQFR93xxRIaA@public.gmane.orgcom>
References : http://marc.info/?l=linux-kernel&m=127628828119623&w=2
Bug-Entry : http://bugzilla.kernel.org/show_bug.cgi?id=16205
Subject : acpi: freeing invalid memtype bf799000-bf79a000
Submitter : Marcin Slusarz <marcin.slusarz-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Date : 2010-06-09 20:09 (30 days old)
Message-ID : <20100609200910.GA2876-OI9uyE9O0yo@public.gmane.org>
References : http://marc.info/?l=linux-kernel&m=127611427029914&w=2
http://marc.info/?l=linux-kernel&m=127688398513862&w=2
Bug-Entry : http://bugzilla.kernel.org/show_bug.cgi?id=16201
Subject : SIOCGIWFREQ ioctl fails to get frequency info
Submitter : nuh <nuh-hRtevi7K+EWJQ7yn63+t2w@public.gmane.org>
Date : 2010-06-14 10:45 (25 days old)
Bug-Entry : http://bugzilla.kernel.org/show_bug.cgi?id=16199
Subject : 2.6.35-rc2-git1 - include/linux/cgroup.h:534 invoked rcu_dereference_check() without protection!
Submitter : Miles Lane <miles.lane-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Date : 2010-06-07 18:14 (32 days old)
Message-ID : <AANLkTin2pPqOUx--9fIX3BH3e-cU6oCRufijcx_4ozx5-JsoAwUIsXotQFR93xxRIaA@public.gmane.orgcom>
References : http://marc.info/?l=linux-kernel&m=127593447812015&w=2
Bug-Entry : http://bugzilla.kernel.org/show_bug.cgi?id=16197
Subject : [BUG on 2.6.35-rc2] sysfs: cannot create duplicate filename '/devices/pci0000:00/0000:00:11.0/0000:02:03.0/slot'
Submitter : Ryan Wang <openspace.wang-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Date : 2010-06-07 0:23 (32 days old)
Message-ID : <AANLkTincwMZPnYW3S4uz4k2GOn52RpgBIBRfzyD010Yo-JsoAwUIsXotQFR93xxRIaA@public.gmane.orgcom>
References : http://marc.info/?l=linux-kernel&m=127587022219378&w=2
Bug-Entry : http://bugzilla.kernel.org/show_bug.cgi?id=16187
Subject : Carrier detection failed in dhcpcd when link is up
Submitter : Christian Casteyde <casteyde.christian-GANU6spQydw@public.gmane.org>
Date : 2010-06-12 15:15 (27 days old)
First-Bad-Commit: http://git.kernel.org/linus/10708f37ae729baba9b67bd134c3720709d4ae62
Handled-By : Andrew Morton <akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
Bug-Entry : http://bugzilla.kernel.org/show_bug.cgi?id=16184
Subject : Container, X86-64, i386, iptables rule
Submitter : Jean-Marc Pigeon <jmp-4qkeo2rQ0gg@public.gmane.org>
Date : 2010-06-12 04:17 (27 days old)
Handled-By : Patrick McHardy <kaber-dcUjhNyLwpNeoWH0uzbU5w@public.gmane.org>
Bug-Entry : http://bugzilla.kernel.org/show_bug.cgi?id=16179
Subject : 2.6.35-rc2 completely hosed on intel gfx?
Submitter : Norbert Preining <preining-DX+603jRYB8@public.gmane.org>
Date : 2010-06-06 11:55 (33 days old)
Message-ID : <20100606115534.GA9399-DqSSrKF0TaySnEC3TeqHn5dqbFPxfnh/@public.gmane.org>
References : http://marc.info/?l=linux-kernel&m=127582534931581&w=2
Bug-Entry : http://bugzilla.kernel.org/show_bug.cgi?id=16175
Subject : 2.6.35-rc1 system oom, many processes killed but memory not free
Submitter : andrew hendry <andrew.hendry-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Date : 2010-06-05 0:46 (34 days old)
Message-ID : <AANLkTim7CiW-yfugZUAHZCqLvXKgt9CwolCvbLGdCLAk-JsoAwUIsXotQFR93xxRIaA@public.gmane.orgcom>
References : http://marc.info/?l=linux-kernel&m=127569877714937&w=2
Bug-Entry : http://bugzilla.kernel.org/show_bug.cgi?id=16173
Subject : After uncompressing the kernel, at boot time, the server hangs.
Submitter : David Hill <hilld-HTiBYHdybX7UkGsOFmftXw@public.gmane.org>
Date : 2010-06-09 23:25 (30 days old)
First-Bad-Commit: http://git.kernel.org/linus/cf7500c0ea133d66f8449d86392d83f840102632
Handled-By : Eric W. Biederman <ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org>
Bug-Entry : http://bugzilla.kernel.org/show_bug.cgi?id=16145
Subject : Unable to boot unless "notsc" or "clocksource=hpet", or acpi_pad disabling the TSC
Submitter : Tom Gundersen <teg-B22kvLQNl6c@public.gmane.org>
Date : 2010-06-07 13:11 (32 days old)
Handled-By : Venkatesh Pallipadi <venki-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
Len Brown <lenb-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Bug-Entry : http://bugzilla.kernel.org/show_bug.cgi?id=16122
Subject : 2.6.35-rc1: WARNING at fs/fs-writeback.c:1142 __mark_inode_dirty+0x103/0x170
Submitter : Larry Finger <Larry.Finger-tQ5ms3gMjBLk1uMJSBkQmQ@public.gmane.org>
Date : 2010-06-04 13:18 (35 days old)
Handled-By : Jens Axboe <axboe-tSWWG44O7X1aa/9Udqfwiw@public.gmane.org>
Regressions with patches
------------------------
Bug-Entry : http://bugzilla.kernel.org/show_bug.cgi?id=16310
Subject : arm omap invalid module format
Submitter : Robert Nelson <robertcnelson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Date : 2010-06-28 17:30 (11 days old)
First-Bad-Commit: http://git.kernel.org/linus/d0679c730395d0bde9a46939e7ba255b4ba7dd7c
Handled-By : Michal Marek <mmarek-AlSwsSmVLrQ@public.gmane.org>
Patch : https://bugzilla.kernel.org/attachment.cgi?id=26999
Bug-Entry : http://bugzilla.kernel.org/show_bug.cgi?id=16278
Subject : lvm snapshot causes deadlock in 2.6.35
Submitter : Phillip Susi <psusi-3tLf1voIkJTQT0dZR+AlfA@public.gmane.org>
Date : 2010-06-23 16:55 (16 days old)
Handled-By : Eric Sandeen <sandeen-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Patch : https://bugzilla.kernel.org/attachment.cgi?id=26933
Bug-Entry : http://bugzilla.kernel.org/show_bug.cgi?id=16271
Subject : 2.6.35-rc3 regression: IBM Maia system is unbootable [ACPI related?]
Submitter : James Bottomley <James.Bottomley-JuX6DAaQMKPCXq6kfMZ53/egYHeGw8Jk@public.gmane.org>
Date : 2010-06-21 16:03 (18 days old)
Message-ID : <1277136189.10998.63.camel-0iu6Cu4xQGLYCGPCin2YbQ@public.gmane.org>
References : http://marc.info/?l=linux-kernel&m=127713622821166&w=2
Handled-By : Len Brown <len.brown-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Patch : https://patchwork.kernel.org/patch/108497/
Bug-Entry : http://bugzilla.kernel.org/show_bug.cgi?id=16256
Subject : tpm_tis breaks suspend/hibernate on kernels > 2.6.34
Submitter : Helmut Schaa <helmut.schaa-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
Date : 2010-06-20 11:15 (19 days old)
First-Bad-Commit: http://git.kernel.org/linus/225a9be24d799aa16d543c31fb09f0c9ed1d9caa
Handled-By : Helmut Schaa <helmut.schaa-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
Patch : http://marc.info/?l=tpmdd-devel&m=127609160616162&w=2
Bug-Entry : http://bugzilla.kernel.org/show_bug.cgi?id=16255
Subject : 2.6.35-rc3 deadlocks on semaphore operations
Submitter : Christoph Lameter <cl-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
Date : 2010-06-18 14:49 (21 days old)
Message-ID : <alpine.DEB.2.00.1006180940140.11575-sBS69tsa9Uj/9pzu0YdTqQ@public.gmane.org>
References : http://marc.info/?l=linux-kernel&m=127687262727707&w=2
Handled-By : Manfred Spraul <manfred-nhLOkwUX5cPe2c5cEj3t2g@public.gmane.org>
Patch : http://marc.info/?l=linux-kernel&m=127731055203402&w=2
Bug-Entry : http://bugzilla.kernel.org/show_bug.cgi?id=16232
Subject : 2.6.35-rc3 - WARNING:iwl_set_dynamic_key
Submitter : Mario Guenterberg <mario.guenterberg-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
Date : 2010-06-14 11:55 (25 days old)
Message-ID : <20100614115510.GA7904@guenti-laptop>
References : http://marc.info/?l=linux-kernel&m=127651695627147&w=2
Handled-By : Reinette Chatre <reinette.chatre-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Patch : http://article.gmane.org/gmane.linux.kernel.wireless.general/52893
Bug-Entry : http://bugzilla.kernel.org/show_bug.cgi?id=16215
Subject : sysfs: cannot create duplicate filename '/class/net/bnep0'
Submitter : Janusz Krzysztofik <jkrzyszt-NCk8gXQAEuFz6jiHbVrK7g@public.gmane.org>
Date : 2010-06-15 14:55 (24 days old)
Handled-By : Eric W. Biederman <ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org>
Patch : https://bugzilla.kernel.org/show_bug.cgi?id=16215#c10
Bug-Entry : http://bugzilla.kernel.org/show_bug.cgi?id=16169
Subject : Complain from preemptive debug
Submitter : Sedat Dilek <sedat.dilek-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
Date : 2010-05-31 10:10 (39 days old)
Message-ID : <AANLkTilTnAAZIizKinYsxFkNTkrmPqk6XJJuUjjhJ7EP-JsoAwUIsXotQFR93xxRIaA@public.gmane.orgcom>
References : http://lkml.org/lkml/2010/5/31/77
Handled-By : Dmitry Monakhov <dmonakhov-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org>
Sergey Senozhatsky <sergey.senozhatsky-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Patch : http://www.spinics.net/lists/cpufreq/msg01631.html
https://patchwork.kernel.org/patch/106555/
For details, please visit the bug entries and follow the links given in
references.
As you can see, there is a Bugzilla entry for each of the listed regressions.
There also is a Bugzilla entry used for tracking the regressions from 2.6.34,
unresolved as well as resolved, at:
http://bugzilla.kernel.org/show_bug.cgi?id=16055
Please let the tracking team know if there are any Bugzilla entries that
should be added to the list in there.
Thanks!
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox