]> git.pld-linux.org Git - packages/kernel.git/blob - kernel-small_fixes.patch
- always apply mount options when mounting /proc
[packages/kernel.git] / kernel-small_fixes.patch
1 --- linux-2.6.33/scripts/mod/modpost.c~ 2010-02-24 19:52:17.000000000 +0100
2 +++ linux-2.6.33/scripts/mod/modpost.c  2010-03-07 14:26:47.242168558 +0100
3 @@ -15,7 +15,8 @@
4  #include <stdio.h>
5  #include <ctype.h>
6  #include "modpost.h"
7 -#include "../../include/generated/autoconf.h"
8 +// PLD architectures don't use CONFIG_SYMBOL_PREFIX
9 +//#include "../../include/generated/autoconf.h"
10  #include "../../include/linux/license.h"
11  
12  /* Some toolchains use a `_' prefix for all user symbols. */
13
14 From: Stephen Hemminger <shemminger@vyatta.com>
15
16 Some BIOS's don't setup power management correctly (what else is
17 new) and don't allow use of PCI Express power control. Add a special
18 exception module parameter to allow working around this issue.
19 Based on slightly different patch by Knut Petersen.
20
21 Reported-by: Arkadiusz Miskiewicz <arekm@maven.pl>
22 Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
23 ---
24 Patch against -net (ie. 3.3.0)
25
26 --- a/drivers/net/ethernet/marvell/sky2.c       2012-01-10 10:56:56.855156017 -0800
27 +++ b/drivers/net/ethernet/marvell/sky2.c       2012-03-21 08:25:52.400929532 -0700
28 @@ -95,6 +95,10 @@ static int disable_msi = 0;
29  module_param(disable_msi, int, 0);
30  MODULE_PARM_DESC(disable_msi, "Disable Message Signaled Interrupt (MSI)");
31  
32 +static int legacy_pme = 0;
33 +module_param(legacy_pme, int, 0);
34 +MODULE_PARM_DESC(legacy_pme, "Legacy power management");
35 +
36  static DEFINE_PCI_DEVICE_TABLE(sky2_id_table) = {
37         { PCI_DEVICE(PCI_VENDOR_ID_SYSKONNECT, 0x9000) }, /* SK-9Sxx */
38         { PCI_DEVICE(PCI_VENDOR_ID_SYSKONNECT, 0x9E00) }, /* SK-9Exx */
39 @@ -867,6 +871,13 @@ static void sky2_wol_init(struct sky2_po
40         /* Disable PiG firmware */
41         sky2_write16(hw, B0_CTST, Y2_HW_WOL_OFF);
42  
43 +       /* Needed by some broken BIOSes, use PCI rather than PCI-e for WOL */
44 +       if (legacy_pme) {
45 +               u32 reg1 = sky2_pci_read32(hw, PCI_DEV_REG1);
46 +               reg1 |= PCI_Y2_PME_LEGACY;
47 +               sky2_pci_write32(hw, PCI_DEV_REG1, reg1);
48 +       }
49 +
50         /* block receiver */
51         sky2_write8(hw, SK_REG(port, RX_GMF_CTRL_T), GMF_RST_SET);
52         sky2_read32(hw, B0_CTST);
53
54
55 The RCU problem is likely to be a separate issue.  It might even be a 
56 result of the use-after-free problem with the elevator.
57
58 At any rate, it's clear that the crash in the refcounting log you
59 posted occurred because scsi_setup_blk_pc_cmnd() called
60 scsi_prep_state_check(), which tried to dereference the NULL pointer.
61
62 Would you like to try this patch to see if it fixes the problem?  As I 
63 said before, I'm not certain it's the best thing to do, but it worked 
64 on my system.
65
66 Alan Stern
67
68
69 Index: usb-3.0/drivers/scsi/scsi_lib.c
70 ===================================================================
71 --- usb-3.0.orig/drivers/scsi/scsi_lib.c
72 +++ usb-3.0/drivers/scsi/scsi_lib.c
73 @@ -1247,6 +1247,8 @@ int scsi_prep_fn(struct request_queue *q
74         struct scsi_device *sdev = q->queuedata;
75         int ret = BLKPREP_KILL;
76  
77 +       if (!sdev)
78 +               return ret;
79         if (req->cmd_type == REQ_TYPE_BLOCK_PC)
80                 ret = scsi_setup_blk_pc_cmnd(sdev, req);
81         return scsi_prep_return(q, req, ret);
82 Index: usb-3.0/drivers/scsi/scsi_sysfs.c
83 ===================================================================
84 --- usb-3.0.orig/drivers/scsi/scsi_sysfs.c
85 +++ usb-3.0/drivers/scsi/scsi_sysfs.c
86 @@ -322,6 +322,8 @@ static void scsi_device_dev_release_user
87                 kfree(evt);
88         }
89  
90 +       /* Freeing the queue signals to block that we're done */
91 +       scsi_free_queue(sdev->request_queue);
92         blk_put_queue(sdev->request_queue);
93         /* NULL queue means the device can't be used */
94         sdev->request_queue = NULL;
95 @@ -936,8 +938,6 @@ void __scsi_remove_device(struct scsi_de
96         /* cause the request function to reject all I/O requests */
97         sdev->request_queue->queuedata = NULL;
98  
99 -       /* Freeing the queue signals to block that we're done */
100 -       scsi_free_queue(sdev->request_queue);
101         put_device(dev);
102  }
103  
104
105
106 --
107 To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
108 the body of a message to majordomo@vger.kernel.org
109 More majordomo info at  http://vger.kernel.org/majordomo-info.html
110 Please read the FAQ at  http://www.tux.org/lkml/
111 --- linux-3.0/scripts/kconfig/lxdialog/check-lxdialog.sh~       2011-07-22 04:17:23.000000000 +0200
112 +++ linux-3.0/scripts/kconfig/lxdialog/check-lxdialog.sh        2011-08-25 21:26:04.799150642 +0200
113 @@ -9,6 +9,12 @@
114                         $cc -print-file-name=lib${lib}.${ext} | grep -q /
115                         if [ $? -eq 0 ]; then
116                                 echo "-l${lib}"
117 +                               for libt in tinfow tinfo ; do
118 +                                       $cc -print-file-name=lib${libt}.${ext} | grep -q /
119 +                                       if [ $? -eq 0 ]; then
120 +                                               echo "-l${libt}"
121 +                                       fi
122 +                               done
123                                 exit
124                         fi
125                 done
126
127
128
129
130 From: Vasiliy Kulikov <segoon@openwall.com>
131 Date: Fri, 23 Mar 2012 20:56:42 +0400
132 Subject: [PATCH] proc: fix mount -t proc -o AAA
133
134 proc_parse_options() inside of proc_mount() runs only once at the boot
135 time without any given options.  So, following umount(2)+mount(2) ignore
136 mount options: proc_parse_options() is not called as ->s_root is already
137 initialized.  To fix that parse mount options unconditionally.
138
139 Signed-off-by: Vasiliy Kulikov <segoon@openwall.com>
140 Reported-by: Arkadiusz Miƛkiewicz <a.miskiewicz@gmail.com>
141 ---
142  fs/proc/root.c |    9 +++++----
143  1 files changed, 5 insertions(+), 4 deletions(-)
144
145 diff --git a/fs/proc/root.c b/fs/proc/root.c
146 index 46a15d8..eed44bf 100644
147 --- a/fs/proc/root.c
148 +++ b/fs/proc/root.c
149 @@ -115,12 +115,13 @@ static struct dentry *proc_mount(struct file_system_type *fs_type,
150         if (IS_ERR(sb))
151                 return ERR_CAST(sb);
152  
153 +       if (!proc_parse_options(options, ns)) {
154 +               deactivate_locked_super(sb);
155 +               return ERR_PTR(-EINVAL);
156 +       }
157 +
158         if (!sb->s_root) {
159                 sb->s_flags = flags;
160 -               if (!proc_parse_options(options, ns)) {
161 -                       deactivate_locked_super(sb);
162 -                       return ERR_PTR(-EINVAL);
163 -               }
164                 err = proc_fill_super(sb);
165                 if (err) {
166                         deactivate_locked_super(sb);
167 -- 
168 1.7.0.4
169
This page took 0.038335 seconds and 4 git commands to generate.