id stringlengths 40 40 | instruction stringlengths 68 308 | input stringlengths 17 33.4k | output stringlengths 100 30k |
|---|---|---|---|
24117727b753426d85ba09671c24854834f81b2c | Analyze and fix the following issue in the Linux kernel code: [DCCP]: Fix ackno setting in SYNC/SYNCACK packets | Problem Details:
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/net/dccp/output.c b/net/dccp/output.c
index 384fd0920983..708fc3c0a969 100644
--- a/net/dccp/output.c
+++ b/net/dccp/output.c
@@ -44,15 +44,8 @@ int dccp_transmit_skb(struct sock *sk, struct sk_buff *skb)
int err, set_ack = 1;
u64 ackno = dp->dccps_gsr;
- /*
- * FIXME: study DCCP_PKT_SYN... |
03ace394ac9bcad38043a381ae5f4860b9c9fa1c | Analyze and fix the following issue in the Linux kernel code: [DCCP]: Fix the ACK and SEQ window variables settings | Problem Details:
This is from a first audit, more eyeballs are more than welcome.
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/net/dccp/dccp.h b/net/dccp/dccp.h
index aab72b8d0703..33968a9422f2 100644
--- a/net/dccp/dccp.h
+++ b/net/dccp/dccp.h
@@ -340,13 +340,11 @@ static inline void dccp_hdr_set_ack(struct dccp_hdr_ack_bits *dhack,
static inline void dccp_update_gsr(struct sock *sk, u64 seq)
{
struct dccp_sock *dp = ... |
a3054d48b9b9d6290eccc9fc09c286ef450d9b1d | Analyze and fix the following issue in the Linux kernel code: [DCCP]: Give more info on Step 6 failure debug printk | Problem Details:
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/net/dccp/input.c b/net/dccp/input.c
index 3c4cbff82e95..ce8396b126d2 100644
--- a/net/dccp/input.c
+++ b/net/dccp/input.c
@@ -136,8 +136,15 @@ static int dccp_check_seqno(struct sock *sk, struct sk_buff *skb)
DCCP_PKT_WITHOUT_ACK_SEQ))
dp->dccps_gar = DCCP_SKB_CB(skb)->dccpd_ack_seq;
... |
2807d4ffb0dccb8f932c3e1701b6b6163153d333 | Analyze and fix the following issue in the Linux kernel code: [DCCP]: Fix seqno setting in dccp_v4_ctl_send_reset | Problem Details:
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/net/dccp/ipv4.c b/net/dccp/ipv4.c
index cc5d60d9afa4..02ebf1f39f38 100644
--- a/net/dccp/ipv4.c
+++ b/net/dccp/ipv4.c
@@ -887,6 +887,7 @@ static void dccp_v4_ctl_send_reset(struct sk_buff *rxskb)
sizeof(struct dccp_hdr_reset);
struct sk_buff *skb;
struct dst_entry *dst;
+ u64 seqno;... |
2c656491e9ce77e12337073973794c4be467a489 | Analyze and fix the following issue in the Linux kernel code: [NET]: Fix ipl=>ihl typo in ip_fast_csum | Problem Details:
Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/include/asm-i386/checksum.h b/include/asm-i386/checksum.h
index f949e44c2a35..67d3630c4e89 100644
--- a/include/asm-i386/checksum.h
+++ b/include/asm-i386/checksum.h
@@ -83,7 +83,7 @@ static inline unsigned short ip_fast_csum(unsigned char * iph,
"adcl $0, %0 ;\n"
"notl %0 ;\n"
"2: ... |
8cd25c1fcfbf6460983e99091d278187421c1a1d | Analyze and fix the following issue in the Linux kernel code: [NET]: fix PROC_FS=n compile | Problem Details:
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/include/net/sock.h b/include/net/sock.h
index d57aece9492c..312cb25cbd18 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -1377,9 +1377,7 @@ extern struct ctl_table core_table[];
extern int sysctl_optmem_max;
#endif
-#ifdef CONFIG_PROC_FS
extern __u32 sysctl_wmem_default;
extern __... |
1bc0986957b63a2fbbc46ab95d3d1d72830bda83 | Analyze and fix the following issue in the Linux kernel code: [DCCP]: Fix the timestamp options | Problem Details:
This changes timestamp, timestamp echo, and elapsed time to use units of 10
usecs as per DCCP spec. This has been tested to verify that times are correct.
Also fixed up length and used hton/ntoh more.
Still to add in later patches:
- actually use elapsed time to adjust RTT
(commented out as was prior ... | ```diff
diff --git a/include/linux/dccp.h b/include/linux/dccp.h
index 3dccdd5108b5..9e3a1370b906 100644
--- a/include/linux/dccp.h
+++ b/include/linux/dccp.h
@@ -415,7 +415,7 @@ struct dccp_sock {
__u64 dccps_gsr;
__u64 dccps_gar;
unsigned long dccps_service;
- unsigned long dccps_timestamp_time;
+ str... |
bf0ff9e578ba7dd8331005f00ad7310122011f43 | Analyze and fix the following issue in the Linux kernel code: [IPVS]: ipv4_table --> ipvs_ipv4_table | Problem Details:
Fix conflict with symbol of same name in global
namespace.
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/net/ipv4/ipvs/ip_vs_ctl.c b/net/ipv4/ipvs/ip_vs_ctl.c
index 7d99ede2ef79..2d66848e7aa0 100644
--- a/net/ipv4/ipvs/ip_vs_ctl.c
+++ b/net/ipv4/ipvs/ip_vs_ctl.c
@@ -1598,7 +1598,7 @@ static ctl_table vs_table[] = {
{ .ctl_name = 0 }
};
-static ctl_table ipv4_table[] = {
+static ctl_table ipvs_ipv... |
c59eab4637dbc3f832503be4ccb9213b0f323d92 | Analyze and fix the following issue in the Linux kernel code: [DCCP]: Use LIMIT_NETDEBUG in some debugging printks | Problem Details:
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/net/dccp/input.c b/net/dccp/input.c
index 68b6e72551ef..3c4cbff82e95 100644
--- a/net/dccp/input.c
+++ b/net/dccp/input.c
@@ -118,8 +118,8 @@ static int dccp_check_seqno(struct sock *sk, struct sk_buff *skb)
lawl = dp->dccps_awl;
if (dh->dccph_type == DCCP_PKT_CLOSEREQ ||
- dh->dccph_type... |
b1c9fe7b818acbd36dc908c5c1ad4cab34c67b39 | Analyze and fix the following issue in the Linux kernel code: [DCCP]: Fix elapsed time option as per section 13.2 of spec v11 | Problem Details:
The elapsed time can be two bytes or four bytes only.
Signed-off-by: Ian McDonald <iam4@cs.waikato.ac.nz>
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/net/dccp/options.c b/net/dccp/options.c
index d87d6be7ab10..85a86bd61f44 100644
--- a/net/dccp/options.c
+++ b/net/dccp/options.c
@@ -293,10 +293,7 @@ static void dccp_insert_option_ndp(struct sock *sk, struct sk_buff *skb)
static inline int dccp_elapsed_time_len(const u32 elapsed_time)
{
- ret... |
e92ae93a8aa66aea12935420cb22d4df1c18d023 | Analyze and fix the following issue in the Linux kernel code: [DCCP]: Send SYNCACK packets in response to SYNC packets | Problem Details:
Also fix step 6 when receiving SYNC or SYNCACK packets, i.e. we were not using
the updated swl.
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/net/dccp/dccp.h b/net/dccp/dccp.h
index fff794c8dfff..4efdce47000b 100644
--- a/net/dccp/dccp.h
+++ b/net/dccp/dccp.h
@@ -122,7 +122,8 @@ extern int dccp_retransmit_skb(struct sock *sk, struct sk_buff *skb);
extern int dccp_send_response(struct sock *sk);
extern void dccp_send_ack(struct sock *s... |
6ed8a48582c08432e84e5610564c1d25fe00dd7f | Analyze and fix the following issue in the Linux kernel code: [NETLINK]: Fix sparse warnings | Problem Details:
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/include/linux/netlink.h b/include/linux/netlink.h
index 7d1d9683b246..167518668936 100644
--- a/include/linux/netlink.h
+++ b/include/linux/netlink.h
@@ -129,7 +129,7 @@ extern struct sock *netlink_kernel_create(int unit, unsigned int groups, void (*
extern void netlink_ack(struct sk_buff *in_skb,... |
9deff7f2365958c5c5aa8cb5a0dd651c4dd83f8f | Analyze and fix the following issue in the Linux kernel code: [RXRPC]: Fix build failure introduced by skb->stamp changes. | Problem Details:
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/net/rxrpc/transport.c b/net/rxrpc/transport.c
index 9bce7794130a..122c086ee2db 100644
--- a/net/rxrpc/transport.c
+++ b/net/rxrpc/transport.c
@@ -330,7 +330,7 @@ static int rxrpc_incoming_msg(struct rxrpc_transport *trans,
msg->trans = trans;
msg->state = RXRPC_MSG_RECEIVED;
- msg->stamp = pk... |
63a1222b1fd79c52491c14534b086bffbfaed8bf | Analyze and fix the following issue in the Linux kernel code: [DECNET]: Fix build after netlink changes. | Problem Details:
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/net/decnet/netfilter/dn_rtmsg.c b/net/decnet/netfilter/dn_rtmsg.c
index afb33a25ea55..1ab94c6e22ed 100644
--- a/net/decnet/netfilter/dn_rtmsg.c
+++ b/net/decnet/netfilter/dn_rtmsg.c
@@ -19,6 +19,7 @@
#include <linux/netfilter.h>
#include <linux/spinlock.h>
#include <linux/netlink.h>
+#include <l... |
77247bbb3094246be9d057e7be442cc708f123a8 | Analyze and fix the following issue in the Linux kernel code: [NETLINK]: Fix module refcounting problems | Problem Details:
Use-after-free: the struct proto_ops containing the module pointer
is freed when a socket with pid=0 is released, which besides for kernel
sockets is true for all unbound sockets.
Module refcount leak: when the kernel socket is closed before all user
sockets have been closed the proto_ops struct for t... | ```diff
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
index 7b7b45a19597..c41a88100fea 100644
--- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
@@ -73,8 +73,12 @@ struct netlink_sock {
struct netlink_callback *cb;
spinlock_t cb_lock;
void (*data_ready)(struct sock *sk, int bytes)... |
43e943c32b9213b5d25407b281c94aaa474fd9a6 | Analyze and fix the following issue in the Linux kernel code: [NETLINK]: Fix missing dst_groups initializations in netlink_broadcast users | Problem Details:
netlink_broadcast users must initialize NETLINK_CB(skb).dst_groups to the
destination group mask for netlink_recvmsg.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/lib/kobject_uevent.c b/lib/kobject_uevent.c
index 88f4d746aa05..bc000619f4f8 100644
--- a/lib/kobject_uevent.c
+++ b/lib/kobject_uevent.c
@@ -93,6 +93,7 @@ static int send_uevent(const char *signal, const char *obj,
}
}
+ NETLINK_CB(skb).dst_groups = 1;
return netlink_broadcast(uevent_sock... |
ad93e266a17c6f606e96304c866eb73665ae34fa | Analyze and fix the following issue in the Linux kernel code: [NETLINK]: w1_int.c: fix default netlink group | Problem Details:
w1 does not need to multicast its state to several groups at once,
and upcoming netlink changes will not allow bitmask for groups anyway.
Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/drivers/w1/w1_int.c b/drivers/w1/w1_int.c
index 8809788dac26..f3f339d057f9 100644
--- a/drivers/w1/w1_int.c
+++ b/drivers/w1/w1_int.c
@@ -86,7 +86,7 @@ static struct w1_master * w1_alloc_dev(u32 id, int slave_count, int slave_ttl,
dev->driver = driver;
- dev->groups = 23;
+ dev->groups = 1;
... |
7de76272b54e3677bcd247d1e1809015236a298d | Analyze and fix the following issue in the Linux kernel code: [IPX]: Fix build error in ipx_recvmsg() | Problem Details:
Missing semicolon introduced by skb->stamp changeset:
d3258b7d8ed96f97032639bc745179f1951b0da5
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/net/ipx/af_ipx.c b/net/ipx/af_ipx.c
index c54f8acc97eb..180e383f707c 100644
--- a/net/ipx/af_ipx.c
+++ b/net/ipx/af_ipx.c
@@ -1797,7 +1797,7 @@ static int ipx_recvmsg(struct kiocb *iocb, struct socket *sock,
if (rc)
goto out_free;
if (skb->tstamp.off_sec)
- skb_get_timestamp(skb, &sk->sk_st... |
a10cedd4b905236603c6c4fd77cf338ebbfb1a60 | Analyze and fix the following issue in the Linux kernel code: [DCCP]: Fix compiler warnings | Problem Details:
may be a false warning if there always is something on ccid3hcrx_hist:
net/dccp/ccids/ccid3.c: In function 'ccid3_hc_rx_packet_recv':
net/dccp/ccids/ccid3.c:1634: warning: 'tstamp.tv_usec' may be used uninitialized in this function
net/dccp/ccids/ccid3.c:1634: warning: 'tstamp.tv_sec' may be used unin... | ```diff
diff --git a/net/dccp/ccids/ccid3.c b/net/dccp/ccids/ccid3.c
index 21948d023c72..2dd3e94ba8f4 100644
--- a/net/dccp/ccids/ccid3.c
+++ b/net/dccp/ccids/ccid3.c
@@ -1634,7 +1634,7 @@ static u32 ccid3_hc_rx_calc_first_li(struct sock *sk)
struct ccid3_hc_rx_sock *hcrx = dp->dccps_hc_rx_ccid_private;
struct dccp... |
a1d3a35518779df0579dd9de0121354b49c68ddc | Analyze and fix the following issue in the Linux kernel code: [DCCP]: Fix sparse warnings | Problem Details:
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/net/dccp/ccids/ccid3.c b/net/dccp/ccids/ccid3.c
index 09274f32a337..21948d023c72 100644
--- a/net/dccp/ccids/ccid3.c
+++ b/net/dccp/ccids/ccid3.c
@@ -82,12 +82,13 @@ enum ccid3_options {
static int ccid3_debug;
-struct dccp_tx_hist *ccid3_tx_hist;
-struct dccp_rx_hist *ccid3_rx_hist;
+static s... |
8649b0d4166e6e80ffa298e75abd8f2afdd491a6 | Analyze and fix the following issue in the Linux kernel code: [DCCP]: Fix RESET handling in dccp_rcv_state_process | Problem Details:
To avoid holding TIMEWAIT state for sockets in the LISTEN state.
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/net/dccp/input.c b/net/dccp/input.c
index 4b8638f153a5..9dadfc362511 100644
--- a/net/dccp/input.c
+++ b/net/dccp/input.c
@@ -402,7 +402,48 @@ int dccp_rcv_state_process(struct sock *sk, struct sk_buff *skb,
const int old_state = sk->sk_state;
int queued = 0;
- if (sk->sk_state != DCCP_LISTEN... |
8ffde671730df0b392ca478643b88ef7153244c0 | Analyze and fix the following issue in the Linux kernel code: [NETFILTER]: Fix div64_64 in ipt_connbytes | Problem Details:
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/net/ipv4/netfilter/ipt_connbytes.c b/net/ipv4/netfilter/ipt_connbytes.c
index 0dfb52c0e808..47128c073d85 100644
--- a/net/ipv4/netfilter/ipt_connbytes.c
+++ b/net/ipv4/netfilter/ipt_connbytes.c
@@ -22,23 +22,19 @@ MODULE_AUTHOR("Harald Welte <laforge@netfilter.org>");
MODULE_DESCRIPTION("iptables ... |
b766b305d3f2d8be173e5d9853534ea1afdbabba | Analyze and fix the following issue in the Linux kernel code: [NETFILTER]: Fix gcc-3.4.x warning about iplicit operator precedence | Problem Details:
Fix gcc-3.4.x warning about iplicit operator precedence in NF_QUEUE_NR()
Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/include/linux/netfilter.h b/include/linux/netfilter.h
index 189ba67ba603..be365e70ee99 100644
--- a/include/linux/netfilter.h
+++ b/include/linux/netfilter.h
@@ -29,7 +29,7 @@
#define NF_VERDICT_QMASK 0xffff0000
#define NF_VERDICT_QBITS 16
-#define NF_QUEUE_NR(x) ((x << NF_VERDICT_QBITS) & NF_V... |
5917ed961def82a4dba9198d11a75f79d115a8cb | Analyze and fix the following issue in the Linux kernel code: [NETFILTER]: Fix NF_QUEUE_NR() macro | Problem Details:
I obviously wanted to use bitwise-or, not logical or.
Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/include/linux/netfilter.h b/include/linux/netfilter.h
index ac3c61411d4b..189ba67ba603 100644
--- a/include/linux/netfilter.h
+++ b/include/linux/netfilter.h
@@ -29,7 +29,7 @@
#define NF_VERDICT_QMASK 0xffff0000
#define NF_VERDICT_QBITS 16
-#define NF_QUEUE_NR(x) ((x << NF_VERDICT_QBITS) & NF_V... |
622439270c74f3ad4f69d1417aca4bb3b79514f4 | Analyze and fix the following issue in the Linux kernel code: [NETFILTER]: Fix compilation when no PROC_FS enabled | Problem Details:
Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/net/netfilter/nf_log.c b/net/netfilter/nf_log.c
index 573e76a770d9..3e76bd0824a2 100644
--- a/net/netfilter/nf_log.c
+++ b/net/netfilter/nf_log.c
@@ -167,12 +167,12 @@ int __init netfilter_log_init(void)
{
#ifdef CONFIG_PROC_FS
struct proc_dir_entry *pde;
+
pde = create_proc_entry("nf_log", S... |
14ab9b867aa6c107b4886bdc5b23f277ab10792e | Analyze and fix the following issue in the Linux kernel code: [BNX2]: Possible sparse fixes, take two | Problem Details:
This patch contains the following possible cleanups/fixes:
- use C99 struct initializers
- make a few arrays and structs static
- remove a few uses of literal 0 as NULL pointer
- use convenience function instead of cast+dereference in bnx2_ioctl()
- remove superfluous casts to u8 * in calls to readl/w... | ```diff
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c
index 8acc655ec1e8..3a9d6a8b90a2 100644
--- a/drivers/net/bnx2.c
+++ b/drivers/net/bnx2.c
@@ -52,7 +52,6 @@ static struct {
{ "HP NC370i Multifunction Gigabit Server Adapter" },
{ "Broadcom NetXtreme II BCM5706 1000Base-SX" },
{ "HP NC370F Multifunction... |
64ce207306debd7157f47282be94770407bec01c | Analyze and fix the following issue in the Linux kernel code: [NET]: Make NETDEBUG pure printk wrappers | Problem Details:
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/include/net/sock.h b/include/net/sock.h
index 8678313a22b4..065df67b6422 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -1316,11 +1316,11 @@ extern int sock_get_timestamp(struct sock *, struct timeval __user *);
*/
#if 0
-#define NETDEBUG(x) do { } while (0)
-#define LIMIT_NETDEBU... |
0b4e03bf0bc43ad6250a1e2fa25fc3eb2b028977 | Analyze and fix the following issue in the Linux kernel code: [DCCP]: Initialize icsk_rto in dccp_v4_init_sock | Problem Details:
Fixes nasty bug related to the retransmit timer (yeah, DCCP does
retransmits) firing too early.
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/net/dccp/ipv4.c b/net/dccp/ipv4.c
index 4fa56dbcbea4..6bccf4dd1e70 100644
--- a/net/dccp/ipv4.c
+++ b/net/dccp/ipv4.c
@@ -1219,6 +1219,7 @@ static int dccp_v4_init_sock(struct sock *sk)
dccp_ctl_socket_init = 0;
dccp_init_xmit_timers(sk);
+ inet_csk(sk)->icsk_rto = DCCP_TIMEOUT_INIT;
sk->s... |
2eb25a6c34504254760e67172f7518d6bfdd7676 | Analyze and fix the following issue in the Linux kernel code: [Bluetooth]: Fix sparse warnings (__nocast type) | Problem Details:
This patch fixes the sparse warnings "implicit cast to nocast type"
for the priority or gfp_mask parameters of the memory allocations.
Signed-off-by: Victor Fusco <victor@cetuc.puc-rio.br>
Signed-off-by: Domen Puncer <domen@coderock.org>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-... | ```diff
diff --git a/drivers/bluetooth/bpa10x.c b/drivers/bluetooth/bpa10x.c
index f696da6f417b..d6b81c1535dd 100644
--- a/drivers/bluetooth/bpa10x.c
+++ b/drivers/bluetooth/bpa10x.c
@@ -307,7 +307,8 @@ unlock:
read_unlock(&data->lock);
}
-static inline struct urb *bpa10x_alloc_urb(struct usb_device *udev, unsigne... |
f6ccf55419c4f0021e7382f000f2fd14a29f3d3c | Analyze and fix the following issue in the Linux kernel code: [DCCP]: Fix u64 printf format warnings. | Problem Details:
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/net/dccp/input.c b/net/dccp/input.c
index 622e976a51fe..76c3401e93a5 100644
--- a/net/dccp/input.c
+++ b/net/dccp/input.c
@@ -274,7 +274,9 @@ static int dccp_rcv_request_sent_state_process(struct sock *sk,
if (!between48(DCCP_SKB_CB(skb)->dccpd_ack_seq, dp->dccps_awl, dp->dccps_awh)) {
dcc... |
e2e268665f6c01686b477a6b0cc5a70bab689d54 | Analyze and fix the following issue in the Linux kernel code: [DCCP]: Fix struct sockaddr_dccp definition | Problem Details:
Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/include/linux/dccp.h b/include/linux/dccp.h
index add4908b8e57..fd1412ddb3ff 100644
--- a/include/linux/dccp.h
+++ b/include/linux/dccp.h
@@ -4,10 +4,14 @@
#include <linux/types.h>
#include <asm/byteorder.h>
-/* FIXME: this is utterly wrong */
+/* Structure describing an Internet (DCCP) socket ... |
7663f18807805f02608457af8e2f59eee5d910fd | Analyze and fix the following issue in the Linux kernel code: [NETFILTER]: return ENOMEM when ip_conntrack_alloc() fails. | Problem Details:
This patch fixes the bug which doesn't return ERR_PTR(-ENOMEM) if it
failed to allocate memory space from slab cache. This bug leads to
erroneously not dropped packets under stress, and wrong statistic
counters ('invalid' is incremented instead of 'drop'). It was
introduced during the ctnetlink merge... | ```diff
diff --git a/net/ipv4/netfilter/ip_conntrack_core.c b/net/ipv4/netfilter/ip_conntrack_core.c
index 9261388d5ac2..285743bfbed3 100644
--- a/net/ipv4/netfilter/ip_conntrack_core.c
+++ b/net/ipv4/netfilter/ip_conntrack_core.c
@@ -655,7 +655,7 @@ struct ip_conntrack *ip_conntrack_alloc(struct ip_conntrack_tuple *or... |
8a61fadb3908454ccfa538aaa75eb1d22def5700 | Analyze and fix the following issue in the Linux kernel code: [NETFILTER]: check nf_log function call arguments | Problem Details:
Check whether pf is too large in order to prevent array overflow.
Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/include/linux/netfilter.h b/include/linux/netfilter.h
index bf430fcbe364..ac3c61411d4b 100644
--- a/include/linux/netfilter.h
+++ b/include/linux/netfilter.h
@@ -157,7 +157,7 @@ struct nf_logger {
/* Function to register/unregister log function. */
int nf_log_register(int pf, struct nf_logger *... |
f682faefb8c6045468c4cf0fe435128352683c22 | Analyze and fix the following issue in the Linux kernel code: [NETFILTER]: fix autoloading of nfnetlink_log | Problem Details:
This patch adds the MODULE_ALIAS required for netnlink autoloading of
nfnetlink_log.
Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/net/netfilter/nfnetlink_log.c b/net/netfilter/nfnetlink_log.c
index 1750f0d6e4de..11584289c262 100644
--- a/net/netfilter/nfnetlink_log.c
+++ b/net/netfilter/nfnetlink_log.c
@@ -991,6 +991,7 @@ static void __exit fini(void)
MODULE_DESCRIPTION("netfilter userspace logging");
MODULE_AUTHOR("Harald ... |
087fe256f0aef8d16b19a30c6fb10b899bf1a701 | Analyze and fix the following issue in the Linux kernel code: [TG3]: Fix bug in setting a tg3_flag | Problem Details:
Found a bug while reviewing the patches the second time.
The TG3_FLAG_TXD_MBOX_HWBUG flag is set after the register access
methods have been determined. This patch fixes it by moving it up before
the various access methods are assigned.
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: ... | ```diff
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index 8bc28b14c70f..af8263a1580e 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -9408,6 +9408,12 @@ static int __devinit tg3_get_invariants(struct tg3 *tp)
}
}
+ /* 5700 BX chips need to have their TX producer index mailboxes
+ * written twic... |
6892914fb7980d844f2bac859f4095df9ebd18da | Analyze and fix the following issue in the Linux kernel code: [TG3]: Add indirect register method for 5703 behind ICH | Problem Details:
This patch adds the new workaround for 5703 A1/A2 if it is behind
certain ICH bridges. The workaround disables memory and uses config.
cycles only to access all registers. The 5702/03 chips can mistakenly
decode the special cycles from the ICH chipsets as memory write cycles,
causing corruption of regi... | ```diff
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index 8411e0f4cb69..3a7cfb81bf89 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -340,10 +340,12 @@ static struct {
static void tg3_write_indirect_reg32(struct tg3 *tp, u32 off, u32 val)
{
- spin_lock_bh(&tp->indirect_lock);
+ unsigned long flags;... |
95b81ef794278c835b321f6376b0522cd5df59b7 | Analyze and fix the following issue in the Linux kernel code: [DCCP]: Fix checksum routines | Problem Details:
Signed-off-by: Yoshifumi Nishida <nishida@csl.sony.co.jp>
Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/net/dccp/dccp.h b/net/dccp/dccp.h
index fb83454102c1..55b690ab61ae 100644
--- a/net/dccp/dccp.h
+++ b/net/dccp/dccp.h
@@ -242,7 +242,8 @@ extern int dccp_setsockopt(struct sock *sk, int level, int optname,
char *optval, int optlen);
extern void dccp_shutdown(struct sock *sk, int how)... |
ff21d5774b4a186c98be6398eacde75d896db804 | Analyze and fix the following issue in the Linux kernel code: [NETFILTER]: fix list traversal order in ctnetlink | Problem Details:
Currently conntracks are inserted after the head. That means that
conntracks are sorted from the biggest to the smallest id. This happens
because we use list_prepend (list_add) instead list_add_tail. This can
result in problems during the list iteration.
list_for_each(i, &ip_conntrack... | ```diff
diff --git a/net/ipv4/netfilter/ip_conntrack_netlink.c b/net/ipv4/netfilter/ip_conntrack_netlink.c
index e3ba449e3e1d..1221a9c8bac2 100644
--- a/net/ipv4/netfilter/ip_conntrack_netlink.c
+++ b/net/ipv4/netfilter/ip_conntrack_netlink.c
@@ -404,7 +404,7 @@ ctnetlink_dump_table(struct sk_buff *skb, struct netlink_... |
28b19d99ac6d92e4fb2fe34144c495019a638a64 | Analyze and fix the following issue in the Linux kernel code: [NETFILTER]: Fix typo in ctnl_exp_cb array (no bug, just memory waste) | Problem Details:
This fixes the size of the ctnl_exp_cb array that is IPCTNL_MSG_EXP_MAX
instead of IPCTNL_MSG_MAX. Simple typo.
Signed-off-by: Pablo Neira Ayuso <pablo@eurodev.net>
Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/net/ipv4/netfilter/ip_conntrack_netlink.c b/net/ipv4/netfilter/ip_conntrack_netlink.c
index f5bda82c2875..e3ba449e3e1d 100644
--- a/net/ipv4/netfilter/ip_conntrack_netlink.c
+++ b/net/ipv4/netfilter/ip_conntrack_netlink.c
@@ -1490,7 +1490,7 @@ static struct nfnl_callback ctnl_cb[IPCTNL_MSG_MAX] = {... |
37012f7fd326eb3c959428a4fe7e203e6304fe43 | Analyze and fix the following issue in the Linux kernel code: [NETFILTER]: fix conntrack refcount leak in unlink_expect() | Problem Details:
In unlink_expect(), the expectation is removed from the list so the
refcount must be dropped as well.
Signed-off-by: Pablo Neira Ayuso <pablo@eurodev.net>
Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/net/ipv4/netfilter/ip_conntrack_core.c b/net/ipv4/netfilter/ip_conntrack_core.c
index dace93eacc5c..9261388d5ac2 100644
--- a/net/ipv4/netfilter/ip_conntrack_core.c
+++ b/net/ipv4/netfilter/ip_conntrack_core.c
@@ -204,6 +204,7 @@ static void unlink_expect(struct ip_conntrack_expect *exp)
list_del... |
14a50bbaa51202b676a95e9b41bc5ed6c77aa9cc | Analyze and fix the following issue in the Linux kernel code: [NETFILTER]: ctnetlink: make sure event order is correct | Problem Details:
The following sequence is displayed during events dumping of an ICMP
connection: [NEW] [DESTROY] [UPDATE]
This happens because the event IPCT_DESTROY is delivered in
death_by_timeout(), that is called from the icmp protocol helper
(ct->timeout.function) once we see the reply.
To fix this, we move thi... | ```diff
diff --git a/net/ipv4/netfilter/ip_conntrack_core.c b/net/ipv4/netfilter/ip_conntrack_core.c
index 5c3f16eae2d8..dace93eacc5c 100644
--- a/net/ipv4/netfilter/ip_conntrack_core.c
+++ b/net/ipv4/netfilter/ip_conntrack_core.c
@@ -316,6 +316,7 @@ destroy_conntrack(struct nf_conntrack *nfct)
IP_NF_ASSERT(atomic_re... |
927ccbcc28dceee29dad876982768cca29738564 | Analyze and fix the following issue in the Linux kernel code: [NETFILTER]: attribute count is an attribute of message type, not subsytem | Problem Details:
Prior to this patch, every nfnetlink subsystem had to specify it's
attribute count. However, in reality the attribute count depends on
the message type within the subsystem, not the subsystem itself. This
patch moves 'attr_count' from 'struct nfnetlink_subsys' into
nfnl_callback to fix this.
Signed-... | ```diff
diff --git a/include/linux/netfilter/nfnetlink.h b/include/linux/netfilter/nfnetlink.h
index 561f9df28808..b0feb2374079 100644
--- a/include/linux/netfilter/nfnetlink.h
+++ b/include/linux/netfilter/nfnetlink.h
@@ -85,9 +85,10 @@ struct nfgenmsg {
struct nfnl_callback
{
- kernel_cap_t cap_required; /* capab... |
bd9a26b7f2ee7567571bb5b7acc1a256c544a0dd | Analyze and fix the following issue in the Linux kernel code: [NETFILTER]: fix ctnetlink 'create_expect' parsing | Problem Details:
There was a stupid copy+paste mistake where we parse the MASK nfattr into
the "tuple" variable instead of the "mask" variable. This patch fixes it.
Thanks to Pablo Neira.
Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/net/ipv4/netfilter/ip_conntrack_netlink.c b/net/ipv4/netfilter/ip_conntrack_netlink.c
index 0ab2d7df6bc4..23f18f6a5535 100644
--- a/net/ipv4/netfilter/ip_conntrack_netlink.c
+++ b/net/ipv4/netfilter/ip_conntrack_netlink.c
@@ -1388,7 +1388,7 @@ ctnetlink_create_expect(struct nfattr *cda[])
err = c... |
88aa0429048d08c18f2772782588f953bbbd79be | Analyze and fix the following issue in the Linux kernel code: [NETFILTER]: conntrack_netlink: Fix locking during conntrack_create | Problem Details:
The current codepath allowed for ip_conntrack_lock to be unlock'ed twice.
Signed-off-by: Pablo Neira <pablo@eurodev.net>
Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/net/ipv4/netfilter/ip_conntrack_netlink.c b/net/ipv4/netfilter/ip_conntrack_netlink.c
index 36a046f22105..0ab2d7df6bc4 100644
--- a/net/ipv4/netfilter/ip_conntrack_netlink.c
+++ b/net/ipv4/netfilter/ip_conntrack_netlink.c
@@ -1052,13 +1052,14 @@ ctnetlink_new_conntrack(struct sock *ctnl, struct sk_... |
a86888b925299330053d20e0eba03ac4d2648c4b | Analyze and fix the following issue in the Linux kernel code: [NETFILTER]: Fix multiple problems with the conntrack event cache | Problem Details:
refcnt underflow: the reference count is decremented when a conntrack
entry is removed from the hash but it is not incremented when entering
new entries.
missing protection of process context against softirq context: all
cache operations need to locally disable softirqs to avoid races.
Additionally th... | ```diff
diff --git a/include/linux/netfilter_ipv4/ip_conntrack.h b/include/linux/netfilter_ipv4/ip_conntrack.h
index ff2c1c6001f9..088742befe49 100644
--- a/include/linux/netfilter_ipv4/ip_conntrack.h
+++ b/include/linux/netfilter_ipv4/ip_conntrack.h
@@ -411,6 +411,7 @@ struct ip_conntrack_stat
#ifdef CONFIG_IP_NF_C... |
e6848976b721eeb5551cd94673faafeef78d9f35 | Analyze and fix the following issue in the Linux kernel code: [NET]: Cleanup INET_REFCNT_DEBUG code | Problem Details:
Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/include/net/inet_common.h b/include/net/inet_common.h
index fbc1f4d140d8..1fbd94d8a316 100644
--- a/include/net/inet_common.h
+++ b/include/net/inet_common.h
@@ -29,7 +29,6 @@ extern unsigned int inet_poll(struct file * file, struct socket *sock, struct p
extern int inet_listen(struct socket *s... |
0ab43f84995f2c2fcc5cc58a9accaa1095e1317f | Analyze and fix the following issue in the Linux kernel code: [NETFILTER]: Core changes required by upcoming nfnetlink_queue code | Problem Details:
- split netfiler verdict in 16bit verdict and 16bit queue number
- add 'queuenum' argument to nf_queue_outfn_t and its users ip[6]_queue
- move NFNL_SUBSYS_ definitions from enum to #define
- introduce autoloading for nfnetlink subsystem modules
- add MODULE_ALIAS_NFNL_SUBSYS macro
- add nf_unregister_... | ```diff
diff --git a/include/linux/netfilter.h b/include/linux/netfilter.h
index d163e20ca8d9..711e05f33d68 100644
--- a/include/linux/netfilter.h
+++ b/include/linux/netfilter.h
@@ -21,6 +21,16 @@
#define NF_STOP 5
#define NF_MAX_VERDICT NF_STOP
+/* we overload the higher bits for encoding auxiliary data such as t... |
5ea68e02766c52c153c62fc423cda659a80e45fa | Analyze and fix the following issue in the Linux kernel code: [SPARC64]: Fix trap state reading for instruction_access_exception. | Problem Details:
1) Read ASI_IMMU SFSR not ASI_DMMU.
2) IMMU has no SFAR, read TPC instead
3) Delete old and incorrect comment about the DTLB protection
trap having a dependency on the SFSR contents in order to
function correctly
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/arch/sparc64/kernel/entry.S b/arch/sparc64/kernel/entry.S
index 88332f00094a..6d0476ff4ff8 100644
--- a/arch/sparc64/kernel/entry.S
+++ b/arch/sparc64/kernel/entry.S
@@ -690,11 +690,6 @@ netbsd_syscall:
retl
nop
- /* These next few routines must be sure to clear the
- * SFSR FaultValid bit ... |
9e2d3cd34a159948dc753a14573e16bffc04dba8 | Analyze and fix the following issue in the Linux kernel code: [PATCH] mod_devicetable.h fixes | Problem Details:
* ieee1394_device_id has kernel_ulong_t field after an odd number of
__u32 ones. Since mod_devicetable.h is included both from kernel and
from host build helper, we may be in trouble if we are building on
32bit host for 64bit target - userland sees unsigned long long,
kernel sees unsigned ... | ```diff
diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h
index dce53ac1625d..97bbccdbcca3 100644
--- a/include/linux/mod_devicetable.h
+++ b/include/linux/mod_devicetable.h
@@ -33,7 +33,8 @@ struct ieee1394_device_id {
__u32 model_id;
__u32 specifier_id;
__u32 version;
- kernel_ulong... |
145ec7d51ae507c7cc8889ad05e24af05bbd9147 | Analyze and fix the following issue in the Linux kernel code: [PATCH] ppc64: Fix a misleading printk in unflatten_dt_node() | Problem Details:
When unflatten_dt_node() fails to find an OF_DT_END_NODE tag it prints
"Weird tag at start of node", this should be "Weird tag at end of node".
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
arch/ppc64/kernel/prom.c | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)
Signed-off-by: P... | ```diff
diff --git a/arch/ppc64/kernel/prom.c b/arch/ppc64/kernel/prom.c
index 255c39ae1b48..04b852d446a3 100644
--- a/arch/ppc64/kernel/prom.c
+++ b/arch/ppc64/kernel/prom.c
@@ -918,7 +918,7 @@ static unsigned long __init unflatten_dt_node(unsigned long mem,
tag = *((u32 *)(*p));
}
if (tag != OF_DT_END_NODE) {
... |
60ba44945714d9b7dae8b85ab0926f6f13809c73 | Analyze and fix the following issue in the Linux kernel code: [PATCH] Fix apparent code overlap in ppc64 head.S | Problem Details:
An #if/#else construct near the top of ppc64's head.S appears to
create overlapping sections of code for iSeries and pSeries (i.e. one
thing on iSeries and something different in the same place on
pSeries). In fact, checking the various absolute offsets, it doesn't.
This patch unravels the #ifdefs to ... | ```diff
diff --git a/arch/ppc64/kernel/head.S b/arch/ppc64/kernel/head.S
index 70e10403b697..1cc9f203c22f 100644
--- a/arch/ppc64/kernel/head.S
+++ b/arch/ppc64/kernel/head.S
@@ -93,6 +93,7 @@ END_FTR_SECTION(0, 1)
/* Catch branch to 0 in real mode */
trap
+
#ifdef CONFIG_PPC_ISERIES
/*
* At offset 0x20, th... |
e28f7faf05159f1cfd564596f5e6178edba6bd49 | Analyze and fix the following issue in the Linux kernel code: [PATCH] Four level pagetables for ppc64 | Problem Details:
Implement 4-level pagetables for ppc64
This patch implements full four-level page tables for ppc64, thereby
extending the usable user address range to 44 bits (16T).
The patch uses a full page for the tables at the bottom and top level,
and a quarter page for the intermediate levels. It uses full 64... | ```diff
diff --git a/arch/ppc64/mm/hash_utils.c b/arch/ppc64/mm/hash_utils.c
index 623b5d130c31..65d6e8527948 100644
--- a/arch/ppc64/mm/hash_utils.c
+++ b/arch/ppc64/mm/hash_utils.c
@@ -302,7 +302,7 @@ int hash_page(unsigned long ea, unsigned long access, unsigned long trap)
int local = 0;
cpumask_t tmp;
- if ((... |
a8eef8a22232e64be76410100c52038b21bda7ed | Analyze and fix the following issue in the Linux kernel code: [PATCH] hostap: Fix null pointer dereference in prism2_pccard_card_present() | Problem Details:
With my Buffalo WLI-CF-S11G PC Card kernel oopses every time in
prism2_interrupt() when I try load the hostap module. local->hw_priv is null
during the first call to prism2_interrupt(). It feels like
interrupts are enabled too early, or something.
This patch fixes the symptom, but not the cause.
Sign... | ```diff
diff --git a/drivers/net/wireless/hostap/hostap_cs.c b/drivers/net/wireless/hostap/hostap_cs.c
index 491cf49042c6..e1f1eb8e484a 100644
--- a/drivers/net/wireless/hostap/hostap_cs.c
+++ b/drivers/net/wireless/hostap/hostap_cs.c
@@ -212,7 +212,7 @@ static int prism2_event(event_t event, int priority,
static int ... |
6c5b90d2c84d557baed56e71729504b467ff3e5b | Analyze and fix the following issue in the Linux kernel code: [PATCH] hostap: Fix hash values for product strings | Problem Details:
hostap_cs: 0.4.1-kernel (Jouni Malinen <jkmaline@cc.hut.fi>)
pcmcia: hostap_cs: invalid hash for product string "BUFFALO": is 0x1b01a57b,
should be 0x2decece3
pcmcia: see Documentation/pcmcia/devicetable.txt for details
pcmcia: hostap_cs: invalid hash for product string "WLI-CF-S11G": is
0xefd5102a, sh... | ```diff
diff --git a/drivers/net/wireless/hostap/hostap_cs.c b/drivers/net/wireless/hostap/hostap_cs.c
index 70242459d57a..491cf49042c6 100644
--- a/drivers/net/wireless/hostap/hostap_cs.c
+++ b/drivers/net/wireless/hostap/hostap_cs.c
@@ -987,7 +987,7 @@ static struct pcmcia_device_id hostap_cs_ids[] = {
"SMC", "SMC... |
91cb70c1769d9b72dd1efe40c31f01005820b09e | Analyze and fix the following issue in the Linux kernel code: [PATCH] ieee80211: Fix debug comments ipw->ieee80211 | Problem Details:
Debug variables and procfs dir should be "ieee80211", not "ipw".
Signed-off-by: Jouni Malinen <jkmaline@cc.hut.fi>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com> | ```diff
diff --git a/include/net/ieee80211.h b/include/net/ieee80211.h
index 679cbf1efdf2..dc36b1be6745 100644
--- a/include/net/ieee80211.h
+++ b/include/net/ieee80211.h
@@ -158,11 +158,11 @@ const char *escape_essid(const char *essid, u8 essid_len);
*
* To add your debug level to the list of levels seen when you ... |
51e828b6a123912f27afc512377ad3e2ab40d2eb | Analyze and fix the following issue in the Linux kernel code: [PATCH] ieee80211: Remove EAPOL debug | Problem Details:
IEEE 802.11 code has no business touching payloads of EAPOL frames.
There are some EAPOL structures defined for debugging and these were
confusingly called EAP types which they are not. Let's just remove these
before someone else starts using them in the kernel.
Signed-off-by: Jouni Malinen <jkmaline@... | ```diff
diff --git a/include/net/ieee80211.h b/include/net/ieee80211.h
index 2f46458e81b7..679cbf1efdf2 100644
--- a/include/net/ieee80211.h
+++ b/include/net/ieee80211.h
@@ -56,35 +56,6 @@ struct ieee80211_hdr_3addr {
__le16 seq_ctl;
} __attribute__ ((packed));
-enum eap_type {
- EAP_PACKET = 0,
- EAPOL_START,
- ... |
20b1730af3ae05450b0e03f5aed40c4313f65db6 | Analyze and fix the following issue in the Linux kernel code: [PATCH] zfcp: bugfix and compile fixes | Problem Details:
Bugfix (usage of uninitialized pointer in zfcp_port_dequeue) and compile
fixes for the zfcp device driver.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Acked-by: James Bottomley <James.Bottomley@steeleye.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torv... | ```diff
diff --git a/drivers/s390/scsi/zfcp_aux.c b/drivers/s390/scsi/zfcp_aux.c
index 6fed4a532ca3..bfe3ba73bc0f 100644
--- a/drivers/s390/scsi/zfcp_aux.c
+++ b/drivers/s390/scsi/zfcp_aux.c
@@ -1403,15 +1403,14 @@ zfcp_port_enqueue(struct zfcp_adapter *adapter, wwn_t wwpn, u32 status,
void
zfcp_port_dequeue(struct z... |
7f84f226389fc5f47b3cb36818972e2e171607de | Analyze and fix the following issue in the Linux kernel code: [PATCH] zfcp: fix compilation due to rports changes | Problem Details:
struct zfcp_port::scsi_id was removed by commit
3859f6a248cbdfbe7b41663f3a2b51f48e30b281
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org> | ```diff
diff --git a/drivers/s390/scsi/zfcp_sysfs_port.c b/drivers/s390/scsi/zfcp_sysfs_port.c
index 7a84c7d474d9..c55e82d91deb 100644
--- a/drivers/s390/scsi/zfcp_sysfs_port.c
+++ b/drivers/s390/scsi/zfcp_sysfs_port.c
@@ -67,7 +67,6 @@ static DEVICE_ATTR(_name, S_IRUGO, zfcp_sysfs_port_##_name##_show, NULL);
ZFCP_DEF... |
e514385be2b355c1f3fc6385a98a6a0fc04235ae | Analyze and fix the following issue in the Linux kernel code: [SCSI] fix sense buffer length handling problem | Problem Details:
The new bio code was incorrectly converted from stack allocated to
kmalloc'd buffer handling. There are two places where it incorrectly
uses sizeof(*sense) to get the size of the sense buffer. This
actually produces one, so no sense data was ever getting back, causing
failure in things like disk spin... | ```diff
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index 58da7f64c22f..72a47ce7a1d3 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -342,12 +342,12 @@ int scsi_execute_req(struct scsi_device *sdev, const unsigned char *cmd,
sense = kmalloc(SCSI_SENSE_BUFFERSIZE, GFP_KERNEL);... |
c9d297c543f379a27a34082070ed03a8ef846fc2 | Analyze and fix the following issue in the Linux kernel code: [SCSI] fix 3ware raid emulated commands | Problem Details:
The 3ware emulated commands all expect they are executing in the
use_sg == 0 case, which isn't true either in the block layer rework or
an SG_IO ioctl.
Fix this by adding the correct kmapping of the first element in the sg
list.
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com> | ```diff
diff --git a/drivers/scsi/3w-xxxx.c b/drivers/scsi/3w-xxxx.c
index 973c51fb0fe2..ae9e0203e9de 100644
--- a/drivers/scsi/3w-xxxx.c
+++ b/drivers/scsi/3w-xxxx.c
@@ -1499,22 +1499,43 @@ static int tw_scsiop_inquiry(TW_Device_Extension *tw_dev, int request_id)
return 0;
} /* End tw_scsiop_inquiry() */
+static ... |
1ccb48bb163853c24840c0a50c2a6df1affe029c | Analyze and fix the following issue in the Linux kernel code: [SCSI] fix C syntax problem in scsi_lib.c | Problem Details:
Older gcc's require variable definitions at the beginning of a block.
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com> | ```diff
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index bdea26b56dc4..58da7f64c22f 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -336,14 +336,15 @@ int scsi_execute_req(struct scsi_device *sdev, const unsigned char *cmd,
struct scsi_sense_hdr *sshdr, int timeout, int... |
33aa687db90dd8541bd5e9a762eebf880eaee767 | Analyze and fix the following issue in the Linux kernel code: [SCSI] convert SPI transport class to scsi_execute | Problem Details:
This one's slightly more difficult. The transport class uses
REQ_FAILFAST, so another interface (scsi_execute) had to be invented to
take the extra flag. Also, the sense functions are shifted around to
allow spi_execute to place data directly into a struct scsi_sense_hdr.
With this change, there's pr... | ```diff
diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c
index e9c451ba71fc..2686d5672e5e 100644
--- a/drivers/scsi/scsi_error.c
+++ b/drivers/scsi/scsi_error.c
@@ -1847,12 +1847,16 @@ EXPORT_SYMBOL(scsi_reset_provider);
int scsi_normalize_sense(const u8 *sense_buffer, int sb_len,
... |
51490c89f95b8581782e9baa855da166441852be | Analyze and fix the following issue in the Linux kernel code: [SCSI] sr.c: Fix getting wrong size | Problem Details:
Here's the problem. Try to do this on 2.6.12:
- Kill udev and HAL
- Insert a CD-ROM into a SCSI or USB CD-ROM drive
- Run dd if=/dev/scd0
- cat /sys/block/sr0/size
- Eject the CD, insert a different one
- Run dd if=/dev/scd0
This is likely to do "access beyond the end of device", if you let it
- cat /s... | ```diff
diff --git a/drivers/scsi/sr.c b/drivers/scsi/sr.c
index 2f259f249522..f63d8c6c2a33 100644
--- a/drivers/scsi/sr.c
+++ b/drivers/scsi/sr.c
@@ -199,15 +199,7 @@ int sr_media_change(struct cdrom_device_info *cdi, int slot)
/* check multisession offset etc */
sr_cd_check(cdi);
- /*
- * If the disk chan... |
8224bfa84d510630b40ea460b2bb380c91acb8ae | Analyze and fix the following issue in the Linux kernel code: [SCSI] ibmvscsi timeout fix | Problem Details:
This patch fixes a long term borkenness in
ibmvscsi where we were using the wrong timeout
field from the scsi command (and using the
wrong units.) Now broken by the fact that the
scsi_cmnd timeout field is gone entirely.
This only worked before because all the SCSI
targets assumed that 0 was default.
... | ```diff
diff --git a/drivers/scsi/ibmvscsi/ibmvscsi.c b/drivers/scsi/ibmvscsi/ibmvscsi.c
index 1ae800ae93d7..e3e6752c4104 100644
--- a/drivers/scsi/ibmvscsi/ibmvscsi.c
+++ b/drivers/scsi/ibmvscsi/ibmvscsi.c
@@ -594,7 +594,7 @@ static int ibmvscsi_queuecommand(struct scsi_cmnd *cmnd,
init_event_struct(evt_struct,
... |
3b2946cc96bfafa90a555c70b2e876cbbd0fae98 | Analyze and fix the following issue in the Linux kernel code: [SCSI] aacraid: Fix aacraid probe breakage (updated) | Problem Details:
This patch fixes the bad assumption of the aacraid driver with use_sg.
I used the 3w-xxxx driver fix as a guide for this.
Signed-off-by: Mark Haverkamp <markh@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com> | ```diff
diff --git a/drivers/scsi/aacraid/aachba.c b/drivers/scsi/aacraid/aachba.c
index 8e3493587299..83bfab73ff65 100644
--- a/drivers/scsi/aacraid/aachba.c
+++ b/drivers/scsi/aacraid/aachba.c
@@ -349,6 +349,27 @@ static void aac_io_done(struct scsi_cmnd * scsicmd)
spin_unlock_irqrestore(host->host_lock, cpu_flags)... |
ebd8bb7647e908e8654e565fa289b0300f9f8fa7 | Analyze and fix the following issue in the Linux kernel code: [SCSI] fix transport class corner case after rework | Problem Details:
If your transport class sets the ATTRIBUTE_CONTAINER_NO_CLASSDEVS flag,
then its configure method never gets called. This patch fixes that so
that the configure method is called with a NULL classdev.
Also remove a spurious inverted comma in the transport_class comments.
Signed-off-by: James Bottomle... | ```diff
diff --git a/drivers/base/attribute_container.c b/drivers/base/attribute_container.c
index 62c093db11e6..ebcae5c34133 100644
--- a/drivers/base/attribute_container.c
+++ b/drivers/base/attribute_container.c
@@ -237,6 +237,11 @@ attribute_container_device_trigger(struct device *dev,
if (!cont->match(cont, dev... |
f786648b89f00d4e66fe6b19beffd30e764651fc | Analyze and fix the following issue in the Linux kernel code: [PATCH] Remove race between con_open and con_close | Problem Details:
[ Same race and same patch also by Steven Rostedt <rostedt@goodmis.org> ]
I have a laptop (G3 powerbook) which will pretty reliably hit a race
between con_open and con_close late in the boot process and oops in
vt_ioctl due to tty->driver_data being NULL.
What happens is this: process A opens /dev/tt... | ```diff
diff --git a/drivers/char/vt.c b/drivers/char/vt.c
index 30d96739fb23..665103ccaee8 100644
--- a/drivers/char/vt.c
+++ b/drivers/char/vt.c
@@ -2433,7 +2433,7 @@ static int con_open(struct tty_struct *tty, struct file *filp)
int ret = 0;
acquire_console_sem();
- if (tty->count == 1) {
+ if (tty->driver_dat... |
3859f6a248cbdfbe7b41663f3a2b51f48e30b281 | Analyze and fix the following issue in the Linux kernel code: [PATCH] zfcp: add rports to enable scsi_add_device to work again | Problem Details:
This patch fixes a severe problem with 2.6.13-rc7.
Due to recent SCSI changes it is not possible to add any LUNs to the zfcp
device driver anymore. With registration of remote ports this is fixed.
Signed-off-by: Andreas Herrmann <aherrman@de.ibm.com>
Acked-by: James Bottomley <jejb@steeleye.com>
Sig... | ```diff
diff --git a/drivers/s390/scsi/zfcp_aux.c b/drivers/s390/scsi/zfcp_aux.c
index e17b4d58a9f6..6fed4a532ca3 100644
--- a/drivers/s390/scsi/zfcp_aux.c
+++ b/drivers/s390/scsi/zfcp_aux.c
@@ -1299,13 +1299,10 @@ struct zfcp_port *
zfcp_port_enqueue(struct zfcp_adapter *adapter, wwn_t wwpn, u32 status,
u32 d_id... |
729d70f5dfd663b44bca68a4479c96bde7e535d6 | Analyze and fix the following issue in the Linux kernel code: [PATCH] sg.c: fix a memory leak in devices seq_file implementation | Problem Details:
I know that scsi procfs is legacy code but this is a fix for a memory leak.
While reading through sg.c I realized that the implementation of
/proc/scsi/sg/devices with seq_file is leaking memory due to freeing the
pointer returned by the next() iterator method. Since next() might return
NULL or an er... | ```diff
diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c
index 51292f269ce5..e822ca0e97cf 100644
--- a/drivers/scsi/sg.c
+++ b/drivers/scsi/sg.c
@@ -2971,23 +2971,22 @@ static void * dev_seq_start(struct seq_file *s, loff_t *pos)
{
struct sg_proc_deviter * it = kmalloc(sizeof(*it), GFP_KERNEL);
+ s->private = it... |
8126fdbc76351bdf99c6737ef4fecf88a22fa538 | Analyze and fix the following issue in the Linux kernel code: [PATCH] fix for race problem in DVB USB drivers (dibusb) | Problem Details:
Fixed race between submitting streaming URBs in the driver and starting
the actual transfer in hardware (demodulator and USB controller) which
sometimes lead to garbled data transfers. URBs are now submitted first,
then the transfer is enabled. Dibusb devices and clones are now fully
functional again.
... | ```diff
diff --git a/drivers/media/dvb/dvb-usb/dibusb-common.c b/drivers/media/dvb/dvb-usb/dibusb-common.c
index 63b626f70c81..9b9d6f8ee74e 100644
--- a/drivers/media/dvb/dvb-usb/dibusb-common.c
+++ b/drivers/media/dvb/dvb-usb/dibusb-common.c
@@ -70,13 +70,22 @@ EXPORT_SYMBOL(dibusb_power_ctrl);
int dibusb2_0_stream... |
820d220de400cfaaf846a2d8b5de93f9ea5a9b80 | Analyze and fix the following issue in the Linux kernel code: [PATCH] Fix capifs bug in initialization error path. | Problem Details:
This fixes a bug in the capifs initialization code, where the
filesystem is not unregistered if kern_mount() fails.
Signed-off-by: James Morris <jmorris@namei.org>
Signed-off-by: Karsten Keil <kkeil@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org> | ```diff
diff --git a/drivers/isdn/capi/capifs.c b/drivers/isdn/capi/capifs.c
index f8570fd9d2ab..3abd7fc6e5ef 100644
--- a/drivers/isdn/capi/capifs.c
+++ b/drivers/isdn/capi/capifs.c
@@ -191,8 +191,10 @@ static int __init capifs_init(void)
err = register_filesystem(&capifs_fs_type);
if (!err) {
capifs_mnt = kern... |
6a029a90f5b93e2b50bcbbaef05ef91fa0c1d6b3 | Analyze and fix the following issue in the Linux kernel code: [PATCH] mmaper_kern.c fixes [buffer overruns] | Problem Details:
- copy_from_user() can fail; ->write() must check its return value.
- severe buffer overruns both in ->read() and ->write() - lseek to the
end (i.e. to mmapper_size) and
if (count + *ppos > mmapper_size)
count = count + *ppos - mmapper_size;
will do absolutely nothing. Then it will call
... | ```diff
diff --git a/arch/um/drivers/mmapper_kern.c b/arch/um/drivers/mmapper_kern.c
index a37a5ac13c22..022f67bb6873 100644
--- a/arch/um/drivers/mmapper_kern.c
+++ b/arch/um/drivers/mmapper_kern.c
@@ -9,19 +9,11 @@
*
*/
-#include <linux/types.h>
-#include <linux/kdev_t.h>
-#include <linux/time.h>
-#include <lin... |
17888225c2f392bfdbac6c7f0713cbd9a4d02b05 | Analyze and fix the following issue in the Linux kernel code: Fix missing audit_syscall_exit() on ppc64 sigsuspend exit path | Problem Details:
When we leave sigsuspend() directly into a signal handler, we don't want
to go via the normal syscall exit path -- it'll corrupt r4 and r5 which
are supposed to be giving information to the signal handler, and it'll
give us one more single-step SIGTRAP than we need if single-stepping is
in operation.
... | ```diff
diff --git a/arch/ppc64/kernel/asm-offsets.c b/arch/ppc64/kernel/asm-offsets.c
index abb9e5b5da03..6f910fa2746f 100644
--- a/arch/ppc64/kernel/asm-offsets.c
+++ b/arch/ppc64/kernel/asm-offsets.c
@@ -68,6 +68,7 @@ int main(void)
DEFINE(THREAD_USED_VR, offsetof(struct thread_struct, used_vr));
#endif /* CONFIG... |
214838a2108b4b1e18abce2e28d37996e9bf7c68 | Analyze and fix the following issue in the Linux kernel code: [PATCH] Fix 6pack setting of MAC address | Problem Details:
Don't check type of sax25_family; dev_set_mac_address has already done
that before and anyway, the type to check against would have been
ARPHRD_AX25. We only got away because AF_AX25 and ARPHRD_AX25 both happen
to be defined to the same value.
Don't check sax25_ndigis either; it's value is insignific... | ```diff
diff --git a/drivers/net/hamradio/6pack.c b/drivers/net/hamradio/6pack.c
index b59c65b9645b..0b230222bfea 100644
--- a/drivers/net/hamradio/6pack.c
+++ b/drivers/net/hamradio/6pack.c
@@ -308,12 +308,6 @@ static int sp_set_mac_address(struct net_device *dev, void *addr)
{
struct sockaddr_ax25 *sa = addr;
- ... |
84a2ea1c2cee0288f96e0c6aa4f975d4d26508c7 | Analyze and fix the following issue in the Linux kernel code: [PATCH] 6pack Timer initialization | Problem Details:
I dropped the timer initialization bits by accident when sending the
p-persistence fix. This patch gets the driver to work again on halfduplex
links.
Signed-off-by: Ralf Baechle DL5RB <ralf@linux-mips.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com> | ```diff
diff --git a/drivers/net/hamradio/6pack.c b/drivers/net/hamradio/6pack.c
index f9e3be96963c..b59c65b9645b 100644
--- a/drivers/net/hamradio/6pack.c
+++ b/drivers/net/hamradio/6pack.c
@@ -668,6 +668,9 @@ static int sixpack_open(struct tty_struct *tty)
netif_start_queue(dev);
init_timer(&sp->tx_t);
+ sp->tx... |
135932651fd1eeb95eb6c5d4f6652aae73fe2c24 | Analyze and fix the following issue in the Linux kernel code: [libata scsi] fix read/write translation edge cases | Problem Details:
Fix bugs for unlikely edge cases noticed by Douglas Gilbert:
- When READ(6)/WRITE(6) sector count == 0, treat it as 256 sectors
- For other READ(x)/WRITE(x), when sector count == 0, error.
We don't support successfully completing zero-length transfers at
this time. | ```diff
diff --git a/drivers/scsi/libata-scsi.c b/drivers/scsi/libata-scsi.c
index f58311b8c050..4074e7877ba3 100644
--- a/drivers/scsi/libata-scsi.c
+++ b/drivers/scsi/libata-scsi.c
@@ -630,11 +630,19 @@ static unsigned int ata_scsi_rw_xlat(struct ata_queued_cmd *qc, u8 *scsicmd)
tf->lbah = scsicmd[3];
VPRINTK... |
d18d36b4edbb980c9de7fe00724c3ded5de1b7a7 | Analyze and fix the following issue in the Linux kernel code: libata: fix a few alan-isms | Problem Details:
| ```diff
diff --git a/drivers/scsi/sata_qstor.c b/drivers/scsi/sata_qstor.c
index 2926846cdd6a..93fd06fb4f15 100644
--- a/drivers/scsi/sata_qstor.c
+++ b/drivers/scsi/sata_qstor.c
@@ -198,7 +198,7 @@ static int qs_check_atapi_dma(struct ata_queued_cmd *qc)
return 1; /* ATAPI DMA not supported */
}
-static void qs_b... |
1ad62a19f177e61d4dde111ba35fb4badd0c2106 | Analyze and fix the following issue in the Linux kernel code: [PATCH] IPoIB: Fix device removal race | Problem Details:
Currently we may have work scheduled in default kernel workqueue when
the device is going down. The device could get freed before this
workqueue gets serviced. I am actually seeing this causing system
hangs.
The following patch fixes this by using ipoib_workqueue which gets
flushed when the device i... | ```diff
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c
index 57c3ac98991f..0e8ac138e355 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_main.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c
@@ -672,7 +672,7 @@ static void ipoib_set_mcast_list(struct net_device *dev)
... |
b9ef520f9caf20aba8ac7cb2bbba45b52ff19d53 | Analyze and fix the following issue in the Linux kernel code: [PATCH] IB: fix userspace CM deadlock | Problem Details:
Fix deadlock condition resulting from trying to destroy a cm_id
from the context of a CM thread. The synchronization around the
ucm context structure is simplified as a result, and some simple
code cleanup is included.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Roland Dreier <rol... | ```diff
diff --git a/drivers/infiniband/core/ucm.c b/drivers/infiniband/core/ucm.c
index 61d07c732f49..79595826ccc7 100644
--- a/drivers/infiniband/core/ucm.c
+++ b/drivers/infiniband/core/ucm.c
@@ -1,5 +1,6 @@
/*
* Copyright (c) 2005 Topspin Communications. All rights reserved.
+ * Copyright (c) 2005 Intel Corpora... |
da6561c285a6e28a075b97fd5a1560a2b0ce843e | Analyze and fix the following issue in the Linux kernel code: [PATCH] IB/mthca: Use correct port width capability value | Problem Details:
When we call the INIT_IB firmware command to bring up a port, use
the actual port width capability returned by the QUERY_DEV_LIM
command instead of always trying to enable both 1X and 4X. This
fixes breakage seen when the firmware is build to allow 4X only.
Signed-off-by: Roland Dreier <rolandd@cisco... | ```diff
diff --git a/drivers/infiniband/hw/mthca/mthca_cmd.c b/drivers/infiniband/hw/mthca/mthca_cmd.c
index e15c1e2deab4..c258c1b7022e 100644
--- a/drivers/infiniband/hw/mthca/mthca_cmd.c
+++ b/drivers/infiniband/hw/mthca/mthca_cmd.c
@@ -1282,10 +1282,8 @@ int mthca_INIT_IB(struct mthca_dev *dev,
#define INIT_IB_FLAG... |
5dd2ce1200f4b12687d74de89a527f99e16c344e | Analyze and fix the following issue in the Linux kernel code: [PATCH] IB: Fix ib_mad_thread_completion_handler declaration | Problem Details:
Change ib_mad_thread_completion_handler to conform to ib_comp_handler
declaration.
Signed-off-by: Hal Rosenstock <halr@voltaire.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com> | ```diff
diff --git a/drivers/infiniband/core/mad.c b/drivers/infiniband/core/mad.c
index 214493cb3a0b..a4a4d9c1eef3 100644
--- a/drivers/infiniband/core/mad.c
+++ b/drivers/infiniband/core/mad.c
@@ -2296,7 +2296,7 @@ static void timeout_sends(void *data)
spin_unlock_irqrestore(&mad_agent_priv->lock, flags);
}
-sta... |
ffbf4c34f1916fa1e0554269c94c57da4a21a348 | Analyze and fix the following issue in the Linux kernel code: [PATCH] IB: unmap FMRs when destroying FMR pool | Problem Details:
Make sure that all FMRs are unmapped before we deallocate them so that
we don't leak references to our protection domain when destroying an
FMR pool. (Bug reported by Guy German <guyg@voltaire.com>)
Signed-off-by: Roland Dreier <rolandd@cisco.com> | ```diff
diff --git a/drivers/infiniband/core/fmr_pool.c b/drivers/infiniband/core/fmr_pool.c
index 7763b31abba7..1f7374927f38 100644
--- a/drivers/infiniband/core/fmr_pool.c
+++ b/drivers/infiniband/core/fmr_pool.c
@@ -334,6 +334,7 @@ void ib_destroy_fmr_pool(struct ib_fmr_pool *pool)
{
struct ib_pool_fmr *fmr;
st... |
36676bcbf9f6bcbea9d06e67ee8d04eacde54952 | Analyze and fix the following issue in the Linux kernel code: [PATCH] Fix oops in sysfs_hash_and_remove_file() | Problem Details:
The problem arises if an entity in sysfs is created and removed without
ever having been made completely visible. In SCSI this is triggered by
removing a device while it's initialising.
The problem appears to be that because it was never made visible in sysfs,
the sysfs dentry has a null d_inode whic... | ```diff
diff --git a/fs/sysfs/inode.c b/fs/sysfs/inode.c
index d727dc960634..970a33f03299 100644
--- a/fs/sysfs/inode.c
+++ b/fs/sysfs/inode.c
@@ -228,6 +228,10 @@ void sysfs_hash_and_remove(struct dentry * dir, const char * name)
struct sysfs_dirent * sd;
struct sysfs_dirent * parent_sd = dir->d_fsdata;
+ if (di... |
e1bcfcaa0b3bec2a67b22c565a0bf508ea90db1d | Analyze and fix the following issue in the Linux kernel code: [PATCH] IB: fix use-after-free in user verbs cleanup | Problem Details:
Fix a use-after-free bug in userspace verbs cleanup: we can't touch
mr->device after we free mr by calling ib_dereg_mr().
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org> | ```diff
diff --git a/drivers/infiniband/core/uverbs_main.c b/drivers/infiniband/core/uverbs_main.c
index eb99e693dec2..5f6e9ea29cd7 100644
--- a/drivers/infiniband/core/uverbs_main.c
+++ b/drivers/infiniband/core/uverbs_main.c
@@ -130,13 +130,14 @@ static int ib_dealloc_ucontext(struct ib_ucontext *context)
list_fo... |
1c9cf6f9861f8d27303ee2531b3b7686269c71ce | Analyze and fix the following issue in the Linux kernel code: [PATCH] arm: fix IXP4xx flash resource range | Problem Details:
We are currently reserving one byte more than actually needed by the flash
device and overlapping into the next I/O expansion bus window. This a)
causes us to allocate an extra page of VM due to ARM ioremap() alignment
code and b) could cause problems if another driver tries to request the
next expans... | ```diff
diff --git a/arch/arm/mach-ixp4xx/coyote-setup.c b/arch/arm/mach-ixp4xx/coyote-setup.c
index 7f58afb27e71..411ea9996190 100644
--- a/arch/arm/mach-ixp4xx/coyote-setup.c
+++ b/arch/arm/mach-ixp4xx/coyote-setup.c
@@ -36,7 +36,7 @@ static struct flash_platform_data coyote_flash_data = {
static struct resource c... |
485761bd6a72d33b3d4fa884927b2b0d983b701e | Analyze and fix the following issue in the Linux kernel code: [PATCH] x86_64: Tell VM about holes in nodes | Problem Details:
Some nodes can have large holes on x86-64.
This fixes problems with the VM allowing too many dirty pages because it
overestimates the number of available RAM in a node. In extreme cases you
can end up with all RAM filled with dirty pages which can lead to deadlocks
and other nasty behaviour.
This pa... | ```diff
diff --git a/arch/x86_64/kernel/e820.c b/arch/x86_64/kernel/e820.c
index 6ded3a50dfe6..b548dea4e5b9 100644
--- a/arch/x86_64/kernel/e820.c
+++ b/arch/x86_64/kernel/e820.c
@@ -185,6 +185,40 @@ unsigned long __init e820_end_of_ram(void)
}
/*
+ * Compute how much memory is missing in a range.
+ * Unlike the o... |
bebf4688e9dbbfdd421736685d607bced91a3c91 | Analyze and fix the following issue in the Linux kernel code: [PATCH] I2C hwmon: kfree fixes | Problem Details:
This patch fixes several instances of hwmon drivers kfree'ing the "wrong"
pointer; the existing code works somewhat by accident.
(akpm: plucked from Greg's queue based on lkml discussion. Finishes off the
patch from Jon Corbet)
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
Signed-off-by: J... | ```diff
diff --git a/drivers/hwmon/adm1026.c b/drivers/hwmon/adm1026.c
index ded6e8adc854..c8a7f47911f9 100644
--- a/drivers/hwmon/adm1026.c
+++ b/drivers/hwmon/adm1026.c
@@ -325,7 +325,7 @@ int adm1026_attach_adapter(struct i2c_adapter *adapter)
int adm1026_detach_client(struct i2c_client *client)
{
i2c_detach_cli... |
32818c2eb6b83ea5065c89e0c3cf774abc4dc02b | Analyze and fix the following issue in the Linux kernel code: [PATCH] ppc64: Fix issue with gcc 4.0 compiled kernels | Problem Details:
I recently had a BUG_ON() go off spuriously on a gcc 4.0 compiled kernel.
It turns out gcc-4.0 was removing a sign extension while earlier gcc
versions would not. Thinking this to be a compiler bug, I submitted a
report:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23422
It turns out we need to cast ... | ```diff
diff --git a/include/asm-ppc64/bug.h b/include/asm-ppc64/bug.h
index 169868fa307d..160178278861 100644
--- a/include/asm-ppc64/bug.h
+++ b/include/asm-ppc64/bug.h
@@ -43,8 +43,8 @@ struct bug_entry *find_bug(unsigned long bugaddr);
".section __bug_table,\"a\"\n\t" \
" .llong 1b,%1,%2,%3\n" \
".previ... |
d395bf12d1ba61437e546eb642f0d7ea666123ff | Analyze and fix the following issue in the Linux kernel code: [ACPI] Reduce acpi-cpufreq switching latency by 50% | Problem Details:
The acpi-cpufreq driver does a P-state get after a P-state set
to verify whether set went through successfully. This test
is kind of redundant as set goes throught most of the times,
and the test is also expensive as a get of P-states can
take a lot of time (same as a set operation) as it goes
through ... | ```diff
diff --git a/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c b/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c
index 60a9e54dd20e..822c8ce9d1f1 100644
--- a/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c
+++ b/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c
@@ -31,6 +31,7 @@
#include <linux/cpufreq.h>
#include <linux/proc_f... |
3fd1bb9baa394856b112e5edbfd3893d92dd1149 | Analyze and fix the following issue in the Linux kernel code: [PATCH] hwmon: Off-by-one error in fscpos driver | Problem Details:
Coverity uncovered an off-by-one error in the fscpos driver, in function
set_temp_reset(). Writing to the temp3_reset sysfs file will lead to an
array overrun, in turn causing an I2C write to a random register of the
FSC Poseidon chip. Additionally, writing to temp1_reset and temp2_reset
will not work ... | ```diff
diff --git a/drivers/hwmon/fscpos.c b/drivers/hwmon/fscpos.c
index 270015b626ad..301ae98bd0ad 100644
--- a/drivers/hwmon/fscpos.c
+++ b/drivers/hwmon/fscpos.c
@@ -167,7 +167,7 @@ static ssize_t set_temp_reset(struct i2c_client *client, struct fscpos_data
"experience to the module author.\n");
/* Suppor... |
566ecb9b258ec4da3c7e1c6ca6fca8a5bb0c8eba | Analyze and fix the following issue in the Linux kernel code: [PATCH] ppc32 8xx: fix m8xx_ide_init() #ifdef | Problem Details:
Be more precise on deciding whether to call m8xx_ide_init() at
m8xx_setup.c:platform_init().
Compilation fails if CONFIG_BLK_DEV_IDE is defined but
CONFIG_BLK_DEV_MPC8xx_IDE isnt.
Signed-off-by: Marcelo Tosatti <marcelo.tosatti@cyclades.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org> | ```diff
diff --git a/arch/ppc/syslib/m8xx_setup.c b/arch/ppc/syslib/m8xx_setup.c
index 55a381af4e37..a3702cfe8f7c 100644
--- a/arch/ppc/syslib/m8xx_setup.c
+++ b/arch/ppc/syslib/m8xx_setup.c
@@ -423,7 +423,7 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
ppc_md.find_end_of_memory = m8xx_find_e... |
1f57ff89fee47a317e9e8ca63bf0f139802cc116 | Analyze and fix the following issue in the Linux kernel code: [PATCH] drivers/hwmon/*: kfree() correct pointers | Problem Details:
The adm9240 driver, in adm9240_detect(), allocates a structure. The
error path attempts to kfree() ->client field of it (second one),
resulting in an oops (or slab corruption) if the hardware is not present.
->client field in adm1026, adm1031, smsc47b397 and smsc47m1 is the first in
${HWMON}_data str... | ```diff
diff --git a/drivers/hwmon/adm1026.c b/drivers/hwmon/adm1026.c
index 4fa17c76eea2..ded6e8adc854 100644
--- a/drivers/hwmon/adm1026.c
+++ b/drivers/hwmon/adm1026.c
@@ -1691,7 +1691,7 @@ int adm1026_detect(struct i2c_adapter *adapter, int address,
/* Error out and cleanup code */
exitfree:
- kfree(new_client... |
d634cc15e8f33332038dc9c078beae79f9382ada | Analyze and fix the following issue in the Linux kernel code: [PATCH] Fix oops in fs/locks.c on close of file with pending locks | Problem Details:
The recent change to locks_remove_flock code in fs/locks.c changes how
byte range locks are removed from closing files, which shows up a bug in
cifs.
The assumption in the cifs code was that the close call sent to the
server would remove any pending locks on the server on this file, but
that is no lon... | ```diff
diff --git a/fs/cifs/file.c b/fs/cifs/file.c
index 30ab70ce5547..3497125189df 100644
--- a/fs/cifs/file.c
+++ b/fs/cifs/file.c
@@ -643,7 +643,7 @@ int cifs_lock(struct file *file, int cmd, struct file_lock *pfLock)
netfid, length,
pfLock->fl_start, numUnlock, numLock, lockType,
wait_flag);
- if (... |
d1e079b3fc90c7c114f46771e983a72ac8740882 | Analyze and fix the following issue in the Linux kernel code: [IA64-SGI] fix bte_copy() calling smp_processor_id() while preemptible | Problem Details:
bte_copy() calls calls smp_processor_id(), which will get flagged if
preemption if enabled. raw_smp_processor_id() is used instead
because we are just using it to pick a BTE interface and are not
tied to a specific cpu.
Signed-off-by: Russ Anderson (rja@sgi.com)
Signed-off-by: Tony Luck <tony.luck@... | ```diff
diff --git a/arch/ia64/sn/kernel/bte.c b/arch/ia64/sn/kernel/bte.c
index b75814efadba..45854c637e9c 100644
--- a/arch/ia64/sn/kernel/bte.c
+++ b/arch/ia64/sn/kernel/bte.c
@@ -105,7 +105,7 @@ bte_result_t bte_copy(u64 src, u64 dest, u64 len, u64 mode, void *notification)
/*
* Start with interface correspond... |
b73fc89f6d1f84326e5e897ad249d00a9f218fd7 | Analyze and fix the following issue in the Linux kernel code: [PATCH] libata: regularize dma_start/stop arguments | Problem Details:
Needed for a few PATA drivers.
Also fix up a wrong comment.
Signed-off-by: Jeff Garzik <jgarzik@pobox.com> | ```diff
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c
index 19b45c2bfa26..f15a07f9f471 100644
--- a/drivers/scsi/libata-core.c
+++ b/drivers/scsi/libata-core.c
@@ -3017,7 +3017,7 @@ static void ata_qc_timeout(struct ata_queued_cmd *qc)
host_stat = ap->ops->bmdma_status(ap);
/* before we d... |
31433ea369d250ad011577eee6110d3efcb9d861 | Analyze and fix the following issue in the Linux kernel code: [PATCH] libata: typo | Problem Details:
You spelt heuristic wrongly. Also reformatted to 80 columns,
ignore the diff and fix the typo if you prefer that.
Signed-off-by: Jeff Garzik <jgarzik@pobox.com> | ```diff
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c
index ec7bff73ae18..19b45c2bfa26 100644
--- a/drivers/scsi/libata-core.c
+++ b/drivers/scsi/libata-core.c
@@ -2459,11 +2459,10 @@ static void ata_pio_complete (struct ata_port *ap)
u8 drv_stat;
/*
- * This is purely hueristic. This is ... |
fd589e0b662c1ea8cfb1e0d20d60a2510979865b | Analyze and fix the following issue in the Linux kernel code: [PATCH] hppfs: fix symlink error path | Problem Details:
While touching this code I noticed the error handling is bogus, so I
fixed it up.
I've removed the IS_ERR(proc_dentry) check, which will never trigger and
is clearly a typo: we must check proc_file instead.
Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Linus Tor... | ```diff
diff --git a/fs/hppfs/hppfs_kern.c b/fs/hppfs/hppfs_kern.c
index 385d440fa234..52930915bad8 100644
--- a/fs/hppfs/hppfs_kern.c
+++ b/fs/hppfs/hppfs_kern.c
@@ -38,7 +38,7 @@ struct hppfs_inode_info {
static inline struct hppfs_inode_info *HPPFS_I(struct inode *inode)
{
- return(list_entry(inode, struct hppfs... |
7c657f2f25d50c602df9291bc6242b98fc090759 | Analyze and fix the following issue in the Linux kernel code: [PATCH] Document idr_get_new_above() semantics, update inotify | Problem Details:
There is an off by one problem with idr_get_new_above.
The comment and function name suggest that it will return an id >
starting_id, but it actually returned an id >= starting_id, and kernel
callers other than inotify treated it as such.
The patch below fixes the comment, and fixes inotifys usage. ... | ```diff
diff --git a/fs/inotify.c b/fs/inotify.c
index 868901b1e779..2e4e2a57708c 100644
--- a/fs/inotify.c
+++ b/fs/inotify.c
@@ -353,7 +353,7 @@ static int inotify_dev_get_wd(struct inotify_device *dev,
do {
if (unlikely(!idr_pre_get(&dev->idr, GFP_KERNEL)))
return -ENOSPC;
- ret = idr_get_new_above(&dev->i... |
26aad69e3dd854abe9028ca873fb40b410a39dd7 | Analyze and fix the following issue in the Linux kernel code: Only pre-allocate 256 bytes of cardbio IO range | Problem Details:
It may seem small, but most cards need much less, if any, and this not
only makes the code adhere to the comment, it seems to fix a boot-time
lockup on a ThinkPad 380XD laptop reported by Tero Roponen <teanropo@cc.jyu.fi>
Signed-off-by: Linus Torvalds <torvalds@osdl.org> | ```diff
diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c
index a2eebc6eaacc..6d864c502a1f 100644
--- a/drivers/pci/setup-bus.c
+++ b/drivers/pci/setup-bus.c
@@ -40,7 +40,7 @@
* FIXME: IO should be max 256 bytes. However, since we may
* have a P2P bridge below a cardbus bridge, we need 4K.
*/
-#defi... |
b8f6153ee421014f42b620238f4203a4106db309 | Analyze and fix the following issue in the Linux kernel code: libata: fix EH locking | Problem Details:
Wrap ata_qc_complete() calls in EH context in spinlocks, to prevent
races (mainly in ATAPI code paths). | ```diff
diff --git a/drivers/scsi/ahci.c b/drivers/scsi/ahci.c
index 348493982b56..841f4e2cfe08 100644
--- a/drivers/scsi/ahci.c
+++ b/drivers/scsi/ahci.c
@@ -586,12 +586,16 @@ static void ahci_intr_error(struct ata_port *ap, u32 irq_stat)
static void ahci_eng_timeout(struct ata_port *ap)
{
- void *mmio = ap->host_... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.