Annotation of /trunk/kernel26-alx/patches-2.6.27-r3/0152-2.6.27.53-all-fixes.patch
Parent Directory | Revision Log
Revision 1176 -
(hide annotations)
(download)
Thu Oct 14 15:11:06 2010 UTC (13 years, 11 months ago) by niro
File size: 8642 byte(s)
Thu Oct 14 15:11:06 2010 UTC (13 years, 11 months ago) by niro
File size: 8642 byte(s)
-2.6.27-alx-r3: new magellan 0.5.2 kernel
1 | niro | 1176 | diff --git a/Makefile b/Makefile |
2 | index 948de60..9447d9d 100644 | ||
3 | --- a/Makefile | ||
4 | +++ b/Makefile | ||
5 | @@ -440,7 +440,11 @@ ifeq ($(config-targets),1) | ||
6 | include $(srctree)/arch/$(SRCARCH)/Makefile | ||
7 | export KBUILD_DEFCONFIG | ||
8 | |||
9 | -config %config: scripts_basic outputmakefile FORCE | ||
10 | +config: scripts_basic outputmakefile FORCE | ||
11 | + $(Q)mkdir -p include/linux include/config | ||
12 | + $(Q)$(MAKE) $(build)=scripts/kconfig $@ | ||
13 | + | ||
14 | +%config: scripts_basic outputmakefile FORCE | ||
15 | $(Q)mkdir -p include/linux include/config | ||
16 | $(Q)$(MAKE) $(build)=scripts/kconfig $@ | ||
17 | |||
18 | @@ -1602,7 +1606,11 @@ endif | ||
19 | $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@) | ||
20 | |||
21 | # Modules | ||
22 | -/ %/: prepare scripts FORCE | ||
23 | +/: prepare scripts FORCE | ||
24 | + $(cmd_crmodverdir) | ||
25 | + $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \ | ||
26 | + $(build)=$(build-dir) | ||
27 | +%/: prepare scripts FORCE | ||
28 | $(cmd_crmodverdir) | ||
29 | $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \ | ||
30 | $(build)=$(build-dir) | ||
31 | diff --git a/arch/arm/include/asm/ptrace.h b/arch/arm/include/asm/ptrace.h | ||
32 | index b415c0e..1c0447e 100644 | ||
33 | --- a/arch/arm/include/asm/ptrace.h | ||
34 | +++ b/arch/arm/include/asm/ptrace.h | ||
35 | @@ -124,15 +124,24 @@ struct pt_regs { | ||
36 | */ | ||
37 | static inline int valid_user_regs(struct pt_regs *regs) | ||
38 | { | ||
39 | - if (user_mode(regs) && (regs->ARM_cpsr & PSR_I_BIT) == 0) { | ||
40 | - regs->ARM_cpsr &= ~(PSR_F_BIT | PSR_A_BIT); | ||
41 | - return 1; | ||
42 | + unsigned long mode = regs->ARM_cpsr & MODE_MASK; | ||
43 | + | ||
44 | + /* | ||
45 | + * Always clear the F (FIQ) and A (delayed abort) bits | ||
46 | + */ | ||
47 | + regs->ARM_cpsr &= ~(PSR_F_BIT | PSR_A_BIT); | ||
48 | + | ||
49 | + if ((regs->ARM_cpsr & PSR_I_BIT) == 0) { | ||
50 | + if (mode == USR_MODE) | ||
51 | + return 1; | ||
52 | + if (elf_hwcap & HWCAP_26BIT && mode == USR26_MODE) | ||
53 | + return 1; | ||
54 | } | ||
55 | |||
56 | /* | ||
57 | * Force CPSR to something logical... | ||
58 | */ | ||
59 | - regs->ARM_cpsr &= PSR_f | PSR_s | (PSR_x & ~PSR_A_BIT) | PSR_T_BIT | MODE32_BIT; | ||
60 | + regs->ARM_cpsr &= PSR_f | PSR_s | PSR_x | PSR_T_BIT | MODE32_BIT; | ||
61 | if (!(elf_hwcap & HWCAP_26BIT)) | ||
62 | regs->ARM_cpsr |= USR_MODE; | ||
63 | |||
64 | diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c | ||
65 | index 452c2d8..debeb88 100644 | ||
66 | --- a/drivers/gpu/drm/drm_drv.c | ||
67 | +++ b/drivers/gpu/drm/drm_drv.c | ||
68 | @@ -504,7 +504,9 @@ int drm_ioctl(struct inode *inode, struct file *filp, | ||
69 | retcode = -EFAULT; | ||
70 | goto err_i1; | ||
71 | } | ||
72 | - } | ||
73 | + } else | ||
74 | + memset(kdata, 0, _IOC_SIZE(cmd)); | ||
75 | + | ||
76 | retcode = func(dev, kdata, file_priv); | ||
77 | |||
78 | if ((retcode == 0) && (cmd & IOC_OUT)) { | ||
79 | diff --git a/drivers/usb/serial/io_ti.c b/drivers/usb/serial/io_ti.c | ||
80 | index 3ff4895..147e044 100644 | ||
81 | --- a/drivers/usb/serial/io_ti.c | ||
82 | +++ b/drivers/usb/serial/io_ti.c | ||
83 | @@ -1156,7 +1156,7 @@ static int download_fw(struct edgeport_serial *serial) | ||
84 | |||
85 | /* Check if we have an old version in the I2C and | ||
86 | update if necessary */ | ||
87 | - if (download_cur_ver != download_new_ver) { | ||
88 | + if (download_cur_ver < download_new_ver) { | ||
89 | dbg("%s - Update I2C dld from %d.%d to %d.%d", | ||
90 | __func__, | ||
91 | firmware_version->Ver_Major, | ||
92 | diff --git a/drivers/usb/serial/navman.c b/drivers/usb/serial/navman.c | ||
93 | index d673653..6177d09 100644 | ||
94 | --- a/drivers/usb/serial/navman.c | ||
95 | +++ b/drivers/usb/serial/navman.c | ||
96 | @@ -24,6 +24,7 @@ static int debug; | ||
97 | |||
98 | static struct usb_device_id id_table [] = { | ||
99 | { USB_DEVICE(0x0a99, 0x0001) }, /* Talon Technology device */ | ||
100 | + { USB_DEVICE(0x0df7, 0x0900) }, /* Mobile Action i-gotU */ | ||
101 | { }, | ||
102 | }; | ||
103 | MODULE_DEVICE_TABLE(usb, id_table); | ||
104 | diff --git a/firmware/Makefile b/firmware/Makefile | ||
105 | index da75a6f..5c01761 100644 | ||
106 | --- a/firmware/Makefile | ||
107 | +++ b/firmware/Makefile | ||
108 | @@ -75,7 +75,7 @@ fw-shipped-$(CONFIG_VIDEO_CPIA2) += cpia2/stv0672_vp4.bin | ||
109 | fw-shipped-all := $(fw-shipped-y) $(fw-shipped-m) $(fw-shipped-) | ||
110 | |||
111 | # Directories which we _might_ need to create, so we have a rule for them. | ||
112 | -firmware-dirs := $(sort $(patsubst %,$(objtree)/$(obj)/%/,$(dir $(fw-external-y) $(fw-shipped-all)))) | ||
113 | +firmware-dirs := $(sort $(addprefix $(objtree)/$(obj)/,$(dir $(fw-external-y) $(fw-shipped-all)))) | ||
114 | |||
115 | quiet_cmd_mkdir = MKDIR $(patsubst $(objtree)/%,%,$@) | ||
116 | cmd_mkdir = mkdir -p $@ | ||
117 | diff --git a/net/can/bcm.c b/net/can/bcm.c | ||
118 | index da0d426..be700a5 100644 | ||
119 | --- a/net/can/bcm.c | ||
120 | +++ b/net/can/bcm.c | ||
121 | @@ -58,6 +58,13 @@ | ||
122 | #include <net/sock.h> | ||
123 | #include <net/net_namespace.h> | ||
124 | |||
125 | +/* | ||
126 | + * To send multiple CAN frame content within TX_SETUP or to filter | ||
127 | + * CAN messages with multiplex index within RX_SETUP, the number of | ||
128 | + * different filters is limited to 256 due to the one byte index value. | ||
129 | + */ | ||
130 | +#define MAX_NFRAMES 256 | ||
131 | + | ||
132 | /* use of last_frames[index].can_dlc */ | ||
133 | #define RX_RECV 0x40 /* received data for this element */ | ||
134 | #define RX_THR 0x80 /* element not been sent due to throttle feature */ | ||
135 | @@ -86,15 +93,15 @@ struct bcm_op { | ||
136 | struct list_head list; | ||
137 | int ifindex; | ||
138 | canid_t can_id; | ||
139 | - int flags; | ||
140 | + u32 flags; | ||
141 | unsigned long frames_abs, frames_filtered; | ||
142 | struct timeval ival1, ival2; | ||
143 | struct hrtimer timer, thrtimer; | ||
144 | ktime_t rx_stamp, kt_ival1, kt_ival2, kt_lastmsg; | ||
145 | int rx_ifindex; | ||
146 | - int count; | ||
147 | - int nframes; | ||
148 | - int currframe; | ||
149 | + u32 count; | ||
150 | + u32 nframes; | ||
151 | + u32 currframe; | ||
152 | struct can_frame *frames; | ||
153 | struct can_frame *last_frames; | ||
154 | struct can_frame sframe; | ||
155 | @@ -173,7 +180,7 @@ static int bcm_read_proc(char *page, char **start, off_t off, | ||
156 | len += snprintf(page + len, PAGE_SIZE - len, | ||
157 | "rx_op: %03X %-5s ", | ||
158 | op->can_id, bcm_proc_getifname(op->ifindex)); | ||
159 | - len += snprintf(page + len, PAGE_SIZE - len, "[%d]%c ", | ||
160 | + len += snprintf(page + len, PAGE_SIZE - len, "[%u]%c ", | ||
161 | op->nframes, | ||
162 | (op->flags & RX_CHECK_DLC)?'d':' '); | ||
163 | if (op->kt_ival1.tv64) | ||
164 | @@ -207,7 +214,7 @@ static int bcm_read_proc(char *page, char **start, off_t off, | ||
165 | list_for_each_entry(op, &bo->tx_ops, list) { | ||
166 | |||
167 | len += snprintf(page + len, PAGE_SIZE - len, | ||
168 | - "tx_op: %03X %s [%d] ", | ||
169 | + "tx_op: %03X %s [%u] ", | ||
170 | op->can_id, bcm_proc_getifname(op->ifindex), | ||
171 | op->nframes); | ||
172 | |||
173 | @@ -288,7 +295,7 @@ static void bcm_send_to_user(struct bcm_op *op, struct bcm_msg_head *head, | ||
174 | struct can_frame *firstframe; | ||
175 | struct sockaddr_can *addr; | ||
176 | struct sock *sk = op->sk; | ||
177 | - int datalen = head->nframes * CFSIZ; | ||
178 | + unsigned int datalen = head->nframes * CFSIZ; | ||
179 | int err; | ||
180 | |||
181 | skb = alloc_skb(sizeof(*head) + datalen, gfp_any()); | ||
182 | @@ -466,7 +473,7 @@ static void bcm_rx_update_and_send(struct bcm_op *op, | ||
183 | * bcm_rx_cmp_to_index - (bit)compares the currently received data to formerly | ||
184 | * received data stored in op->last_frames[] | ||
185 | */ | ||
186 | -static void bcm_rx_cmp_to_index(struct bcm_op *op, int index, | ||
187 | +static void bcm_rx_cmp_to_index(struct bcm_op *op, unsigned int index, | ||
188 | struct can_frame *rxdata) | ||
189 | { | ||
190 | /* | ||
191 | @@ -548,7 +555,7 @@ static int bcm_rx_thr_flush(struct bcm_op *op) | ||
192 | int updated = 0; | ||
193 | |||
194 | if (op->nframes > 1) { | ||
195 | - int i; | ||
196 | + unsigned int i; | ||
197 | |||
198 | /* for MUX filter we start at index 1 */ | ||
199 | for (i = 1; i < op->nframes; i++) { | ||
200 | @@ -597,7 +604,7 @@ static void bcm_rx_handler(struct sk_buff *skb, void *data) | ||
201 | { | ||
202 | struct bcm_op *op = (struct bcm_op *)data; | ||
203 | struct can_frame rxframe; | ||
204 | - int i; | ||
205 | + unsigned int i; | ||
206 | |||
207 | /* disable timeout */ | ||
208 | hrtimer_cancel(&op->timer); | ||
209 | @@ -799,14 +806,15 @@ static int bcm_tx_setup(struct bcm_msg_head *msg_head, struct msghdr *msg, | ||
210 | { | ||
211 | struct bcm_sock *bo = bcm_sk(sk); | ||
212 | struct bcm_op *op; | ||
213 | - int i, err; | ||
214 | + unsigned int i; | ||
215 | + int err; | ||
216 | |||
217 | /* we need a real device to send frames */ | ||
218 | if (!ifindex) | ||
219 | return -ENODEV; | ||
220 | |||
221 | - /* we need at least one can_frame */ | ||
222 | - if (msg_head->nframes < 1) | ||
223 | + /* check nframes boundaries - we need at least one can_frame */ | ||
224 | + if (msg_head->nframes < 1 || msg_head->nframes > MAX_NFRAMES) | ||
225 | return -EINVAL; | ||
226 | |||
227 | /* check the given can_id */ | ||
228 | @@ -966,6 +974,10 @@ static int bcm_rx_setup(struct bcm_msg_head *msg_head, struct msghdr *msg, | ||
229 | msg_head->nframes = 0; | ||
230 | } | ||
231 | |||
232 | + /* the first element contains the mux-mask => MAX_NFRAMES + 1 */ | ||
233 | + if (msg_head->nframes > MAX_NFRAMES + 1) | ||
234 | + return -EINVAL; | ||
235 | + | ||
236 | if ((msg_head->flags & RX_RTR_FRAME) && | ||
237 | ((msg_head->nframes != 1) || | ||
238 | (!(msg_head->can_id & CAN_RTR_FLAG)))) | ||
239 | diff --git a/scripts/mkmakefile b/scripts/mkmakefile | ||
240 | index e65d8b3..278b64e 100644 | ||
241 | --- a/scripts/mkmakefile | ||
242 | +++ b/scripts/mkmakefile | ||
243 | @@ -42,7 +42,9 @@ all: | ||
244 | |||
245 | Makefile:; | ||
246 | |||
247 | -\$(all) %/: all | ||
248 | +\$(all): all | ||
249 | @: | ||
250 | |||
251 | +%/: all | ||
252 | + @: | ||
253 | EOF | ||
254 | diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c | ||
255 | index e2d25da..750cb17 100644 | ||
256 | --- a/security/selinux/hooks.c | ||
257 | +++ b/security/selinux/hooks.c | ||
258 | @@ -1290,7 +1290,7 @@ static int inode_doinit_with_dentry(struct inode *inode, struct dentry *opt_dent | ||
259 | /* Default to the fs superblock SID. */ | ||
260 | isec->sid = sbsec->sid; | ||
261 | |||
262 | - if (sbsec->proc) { | ||
263 | + if (sbsec->proc && !S_ISLNK(inode->i_mode)) { | ||
264 | struct proc_inode *proci = PROC_I(inode); | ||
265 | if (proci->pde) { | ||
266 | isec->sclass = inode_mode_to_security_class(inode->i_mode); |