From a43b90ecebdb0f413ddc579a614e362e9cba6ad1 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 24 Aug 2010 10:40:41 -0700 Subject: [PATCH] .32 patches --- ...mplifier-by-default-for-thinkpad-x31.patch | 38 +++++ queue-2.6.32/fixes-for-using-make-3.82.patch | 48 +++++++ queue-2.6.32/netlink-fix-compat-recvmsg.patch | 130 ++++++++++++++++++ queue-2.6.32/series | 3 + 4 files changed, 219 insertions(+) create mode 100644 queue-2.6.32/alsa-intel8x0-mute-external-amplifier-by-default-for-thinkpad-x31.patch create mode 100644 queue-2.6.32/fixes-for-using-make-3.82.patch create mode 100644 queue-2.6.32/netlink-fix-compat-recvmsg.patch diff --git a/queue-2.6.32/alsa-intel8x0-mute-external-amplifier-by-default-for-thinkpad-x31.patch b/queue-2.6.32/alsa-intel8x0-mute-external-amplifier-by-default-for-thinkpad-x31.patch new file mode 100644 index 00000000000..c3547a153d4 --- /dev/null +++ b/queue-2.6.32/alsa-intel8x0-mute-external-amplifier-by-default-for-thinkpad-x31.patch @@ -0,0 +1,38 @@ +From 9c77b846ec8b4e0c7107dd7f820172462dc84a61 Mon Sep 17 00:00:00 2001 +From: Daniel T Chen +Date: Wed, 18 Aug 2010 19:33:43 -0400 +Subject: ALSA: intel8x0: Mute External Amplifier by default for ThinkPad X31 + +From: Daniel T Chen + +commit 9c77b846ec8b4e0c7107dd7f820172462dc84a61 upstream. + +BugLink: https://bugs.launchpad.net/bugs/619439 + +This ThinkPad model needs External Amplifier muted for audible playback, +so set the inv_eapd quirk for it. + +Reported-and-tested-by: Dennis Bell +Signed-off-by: Daniel T Chen +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/pci/intel8x0.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +--- a/sound/pci/intel8x0.c ++++ b/sound/pci/intel8x0.c +@@ -1776,6 +1776,12 @@ static struct ac97_quirk ac97_quirks[] _ + }, + { + .subvendor = 0x1014, ++ .subdevice = 0x0534, ++ .name = "ThinkPad X31", ++ .type = AC97_TUNE_INV_EAPD ++ }, ++ { ++ .subvendor = 0x1014, + .subdevice = 0x1f00, + .name = "MS-9128", + .type = AC97_TUNE_ALC_JACK diff --git a/queue-2.6.32/fixes-for-using-make-3.82.patch b/queue-2.6.32/fixes-for-using-make-3.82.patch new file mode 100644 index 00000000000..7ffcb4ade6f --- /dev/null +++ b/queue-2.6.32/fixes-for-using-make-3.82.patch @@ -0,0 +1,48 @@ +From 3c955b407a084810f57260d61548cc92c14bc627 Mon Sep 17 00:00:00 2001 +From: Jan Beulich +Date: Mon, 16 Aug 2010 11:58:58 +0100 +Subject: fixes for using make 3.82 + +From: Jan Beulich + +commit 3c955b407a084810f57260d61548cc92c14bc627 upstream. + +It doesn't like pattern and explicit rules to be on the same line, +and it seems to be more picky when matching file (or really directory) +names with different numbers of trailing slashes. + +Signed-off-by: Jan Beulich +Acked-by: Sam Ravnborg +Andrew Benton +Signed-off-by: Michal Marek +Signed-off-by: Greg Kroah-Hartman + +--- + firmware/Makefile | 2 +- + scripts/mkmakefile | 4 +++- + 2 files changed, 4 insertions(+), 2 deletions(-) + +--- a/firmware/Makefile ++++ b/firmware/Makefile +@@ -140,7 +140,7 @@ fw-shipped-$(CONFIG_YAM) += yam/1200.bin + fw-shipped-all := $(fw-shipped-y) $(fw-shipped-m) $(fw-shipped-) + + # Directories which we _might_ need to create, so we have a rule for them. +-firmware-dirs := $(sort $(patsubst %,$(objtree)/$(obj)/%/,$(dir $(fw-external-y) $(fw-shipped-all)))) ++firmware-dirs := $(sort $(addprefix $(objtree)/$(obj)/,$(dir $(fw-external-y) $(fw-shipped-all)))) + + quiet_cmd_mkdir = MKDIR $(patsubst $(objtree)/%,%,$@) + cmd_mkdir = mkdir -p $@ +--- a/scripts/mkmakefile ++++ b/scripts/mkmakefile +@@ -44,7 +44,9 @@ all: + + Makefile:; + +-\$(all) %/: all ++\$(all): all + @: + ++%/: all ++ @: + EOF diff --git a/queue-2.6.32/netlink-fix-compat-recvmsg.patch b/queue-2.6.32/netlink-fix-compat-recvmsg.patch new file mode 100644 index 00000000000..89e5faa1910 --- /dev/null +++ b/queue-2.6.32/netlink-fix-compat-recvmsg.patch @@ -0,0 +1,130 @@ +From 68d6ac6d2740b6a55f3ae92a4e0be6d881904b32 Mon Sep 17 00:00:00 2001 +From: Johannes Berg +Date: Sun, 15 Aug 2010 21:20:44 +0000 +Subject: netlink: fix compat recvmsg + +From: Johannes Berg + +commit 68d6ac6d2740b6a55f3ae92a4e0be6d881904b32 upstream. + +Since +commit 1dacc76d0014a034b8aca14237c127d7c19d7726 +Author: Johannes Berg +Date: Wed Jul 1 11:26:02 2009 +0000 + + net/compat/wext: send different messages to compat tasks + +we had a race condition when setting and then +restoring frag_list. Eric attempted to fix it, +but the fix created even worse problems. + +However, the original motivation I had when I +added the code that turned out to be racy is +no longer clear to me, since we only copy up +to skb->len to userspace, which doesn't include +the frag_list length. As a result, not doing +any frag_list clearing and restoring avoids +the race condition, while not introducing any +other problems. + +Additionally, while preparing this patch I found +that since none of the remaining netlink code is +really aware of the frag_list, we need to use the +original skb's information for packet information +and credentials. This fixes, for example, the +group information received by compat tasks. + +Cc: Eric Dumazet +Signed-off-by: Johannes Berg +Acked-by: Eric Dumazet +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman + +--- + net/netlink/af_netlink.c | 46 ++++++++++++++++------------------------------ + 1 file changed, 16 insertions(+), 30 deletions(-) + +--- a/net/netlink/af_netlink.c ++++ b/net/netlink/af_netlink.c +@@ -1363,7 +1363,7 @@ static int netlink_recvmsg(struct kiocb + struct netlink_sock *nlk = nlk_sk(sk); + int noblock = flags&MSG_DONTWAIT; + size_t copied; +- struct sk_buff *skb, *frag __maybe_unused = NULL; ++ struct sk_buff *skb, *data_skb; + int err; + + if (flags&MSG_OOB) +@@ -1375,45 +1375,35 @@ static int netlink_recvmsg(struct kiocb + if (skb == NULL) + goto out; + ++ data_skb = skb; ++ + #ifdef CONFIG_COMPAT_NETLINK_MESSAGES + if (unlikely(skb_shinfo(skb)->frag_list)) { +- bool need_compat = !!(flags & MSG_CMSG_COMPAT); +- + /* +- * If this skb has a frag_list, then here that means that +- * we will have to use the frag_list skb for compat tasks +- * and the regular skb for non-compat tasks. ++ * If this skb has a frag_list, then here that means that we ++ * will have to use the frag_list skb's data for compat tasks ++ * and the regular skb's data for normal (non-compat) tasks. + * +- * The skb might (and likely will) be cloned, so we can't +- * just reset frag_list and go on with things -- we need to +- * keep that. For the compat case that's easy -- simply get +- * a reference to the compat skb and free the regular one +- * including the frag. For the non-compat case, we need to +- * avoid sending the frag to the user -- so assign NULL but +- * restore it below before freeing the skb. ++ * If we need to send the compat skb, assign it to the ++ * 'data_skb' variable so that it will be used below for data ++ * copying. We keep 'skb' for everything else, including ++ * freeing both later. + */ +- if (need_compat) { +- struct sk_buff *compskb = skb_shinfo(skb)->frag_list; +- skb_get(compskb); +- kfree_skb(skb); +- skb = compskb; +- } else { +- frag = skb_shinfo(skb)->frag_list; +- skb_shinfo(skb)->frag_list = NULL; +- } ++ if (flags & MSG_CMSG_COMPAT) ++ data_skb = skb_shinfo(skb)->frag_list; + } + #endif + + msg->msg_namelen = 0; + +- copied = skb->len; ++ copied = data_skb->len; + if (len < copied) { + msg->msg_flags |= MSG_TRUNC; + copied = len; + } + +- skb_reset_transport_header(skb); +- err = skb_copy_datagram_iovec(skb, 0, msg->msg_iov, copied); ++ skb_reset_transport_header(data_skb); ++ err = skb_copy_datagram_iovec(data_skb, 0, msg->msg_iov, copied); + + if (msg->msg_name) { + struct sockaddr_nl *addr = (struct sockaddr_nl *)msg->msg_name; +@@ -1433,11 +1423,7 @@ static int netlink_recvmsg(struct kiocb + } + siocb->scm->creds = *NETLINK_CREDS(skb); + if (flags & MSG_TRUNC) +- copied = skb->len; +- +-#ifdef CONFIG_COMPAT_NETLINK_MESSAGES +- skb_shinfo(skb)->frag_list = frag; +-#endif ++ copied = data_skb->len; + + skb_free_datagram(sk, skb); + diff --git a/queue-2.6.32/series b/queue-2.6.32/series index ef6408f3f7f..5f6a7932930 100644 --- a/queue-2.6.32/series +++ b/queue-2.6.32/series @@ -40,3 +40,6 @@ pcmcia-avoid-buffer-overflow-in-pcmcia_setup_isa_irq.patch ext4-consolidate-in_range-definitions.patch oprofile-change-cpuids-from-decimal-to-hex-and-add-some-comments.patch oprofile-add-support-for-intel-processor-model-30.patch +fixes-for-using-make-3.82.patch +alsa-intel8x0-mute-external-amplifier-by-default-for-thinkpad-x31.patch +netlink-fix-compat-recvmsg.patch -- 2.47.3