Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux

Pull arm64 fix from Catalin Marinas:
"Fix uninitialised variable warning (from smatch) in the arm64 compat
alignment fixup code"

* tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
arm64: compat: Work around uninitialized variable warning

+14 -18
+14 -18
arch/arm64/kernel/compat_alignment.c
··· 314 314 int (*handler)(unsigned long addr, u32 instr, struct pt_regs *regs); 315 315 unsigned int type; 316 316 u32 instr = 0; 317 - u16 tinstr = 0; 318 317 int isize = 4; 319 318 int thumb2_32b = 0; 320 - int fault; 321 319 322 320 instrptr = instruction_pointer(regs); 323 321 324 322 if (compat_thumb_mode(regs)) { 325 323 __le16 __user *ptr = (__le16 __user *)(instrptr & ~1); 324 + u16 tinstr, tinst2; 326 325 327 - fault = alignment_get_thumb(regs, ptr, &tinstr); 328 - if (!fault) { 329 - if (IS_T32(tinstr)) { 330 - /* Thumb-2 32-bit */ 331 - u16 tinst2; 332 - fault = alignment_get_thumb(regs, ptr + 1, &tinst2); 333 - instr = ((u32)tinstr << 16) | tinst2; 334 - thumb2_32b = 1; 335 - } else { 336 - isize = 2; 337 - instr = thumb2arm(tinstr); 338 - } 326 + if (alignment_get_thumb(regs, ptr, &tinstr)) 327 + return 1; 328 + 329 + if (IS_T32(tinstr)) { /* Thumb-2 32-bit */ 330 + if (alignment_get_thumb(regs, ptr + 1, &tinst2)) 331 + return 1; 332 + instr = ((u32)tinstr << 16) | tinst2; 333 + thumb2_32b = 1; 334 + } else { 335 + isize = 2; 336 + instr = thumb2arm(tinstr); 339 337 } 340 338 } else { 341 - fault = alignment_get_arm(regs, (__le32 __user *)instrptr, &instr); 339 + if (alignment_get_arm(regs, (__le32 __user *)instrptr, &instr)) 340 + return 1; 342 341 } 343 - 344 - if (fault) 345 - return 1; 346 342 347 343 switch (CODING_BITS(instr)) { 348 344 case 0x00000000: /* 3.13.4 load/store instruction extensions */