Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync up with Linus #92

Merged
merged 110 commits into from
Aug 14, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
110 commits
Select commit Hold shift + click to select a range
d50babb
xen-blkfront: introduce blkfront_gather_backend_features()
Jul 22, 2015
7b07675
xen-blkfront: don't add indirect pages to list when !feature_persistent
Jul 22, 2015
53bc7dc
xen-blkback: replace work_pending with work_busy in purge_persistent_…
Jul 22, 2015
e162b21
Merge branch 'stable/for-jens-4.2' of git://git.kernel.org/pub/scm/li…
axboe Jul 27, 2015
c9fdec9
iwlwifi: pcie: fix prepare card flow
egrumbach Jul 20, 2015
dc9f69b
iwlwifi: mvm: Fix regular scan priority
AviStern Jul 7, 2015
8ef9724
regmap: regcache-rbtree: Clean new present bits on present bitmap resize
groeck Jul 27, 2015
f0ad462
netfilter: nf_conntrack: silence warning on falling back to vmalloc()
ummakynes Jul 23, 2015
1a727c6
netfilter: nf_conntrack: checking for IS_ERR() instead of NULL
Jul 27, 2015
aecdc63
iwlwifi: pcie: fix stuck queue detection for sleeping clients
egrumbach Jul 29, 2015
f7c0af8
Merge tag 'iwlwifi-for-kalle-2015-07-30' of https://git.kernel.org/pu…
Jul 31, 2015
5d5cd85
rsi: Fix failure to load firmware after memory leak fix and fix the leak
MikeLooijmans Jul 28, 2015
098697d
b43: fix extpa_gain check for 2GHz
hauke Jul 29, 2015
7c62940
rtlwifi: Fix NULL dereference when PCI driver used as an AP
lfdominguez Jul 30, 2015
3473f26
ARM: 8405/1: VDSO: fix regression with toolchains lacking ld.bfd exec…
nlynch-mentor Jul 17, 2015
1ebd47e
rocker: free netdevice during netdevice removal
idosch Aug 2, 2015
3d0e0af
fq_codel: explicitly reset flows in ->reset()
Aug 1, 2015
741e3b9
rtlwifi: rtl8723be: Add module parameter for MSI interrupts
lwfinger Aug 2, 2015
3576fd7
openvswitch: Fix L4 checksum handling when dealing with IP fragments
Aug 3, 2015
636dba8
act_mirred: avoid calling tcf_hash_release() when binding
congwang Jul 31, 2015
468b732
rds: fix an integer overflow test in rds_info_getsockopt()
Aug 1, 2015
2fc0996
3c59x: Fix resource leaks in vortex_open
XidianGeneral Aug 3, 2015
10e2eb8
udp: fix dst races with multicast early demux
Aug 1, 2015
2475b22
xen-netback: Allocate fraglist early to avoid complex rollback
rosslagerwall Aug 3, 2015
f202a66
batman-adv: avoid DAT to mess up LAN state
ordex Jun 16, 2015
354136b
batman-adv: fix kernel crash due to missing NULL checks
Jun 9, 2015
ef72706
batman-adv: protect tt_local_entry from concurrent delete events
Jun 17, 2015
27a4d5e
batman-adv: initialize up/down values when adding a gateway
Jun 24, 2015
f58e5aa
netfilter: conntrack: Use flags in nf_ct_tmpl_alloc()
joestringer Aug 5, 2015
cb92205
Bluetooth: fix MGMT_EV_NEW_LONG_TERM_KEY event
Aug 5, 2015
14d2b7c
net: fec: fix initial runtime PM refcount
lynxeye-dev Aug 3, 2015
a0a2a66
net: Fix skb_set_peeked use-after-free bug
herbertx Aug 4, 2015
57b2290
xen/netback: Wake dealloc thread after completing zerocopy work
rosslagerwall Aug 4, 2015
7ba8bd7
net: pktgen: don't abuse current->state in pktgen_thread_worker()
oleg-nesterov Aug 4, 2015
50e18af
Merge tag 'wireless-drivers-for-davem-2015-08-04' of git://git.kernel…
davem330 Aug 7, 2015
355b9f9
bridge: netlink: account for the IFLA_BRPORT_PROXYARP attribute size …
Aug 4, 2015
786c207
bridge: netlink: account for the IFLA_BRPORT_PROXYARP_WIFI attribute …
Aug 4, 2015
7ebc482
r8169: enforce RX_MULTI_EN on rtl8168ep/8111ep chips
Aug 4, 2015
22f54bf
net: thunderx: remove effective "default y" from Kconfig if ARCH_THUN…
ijc Aug 4, 2015
866b8b1
net: netcp: fix unused interface rx buffer size configuration
wingmankwok Aug 4, 2015
4f7eb70
stmmac: dwmac-ipq806x: fix static checker warning
Aug 5, 2015
48900cb
virtio-net: drop NETIF_F_FRAGLIST
jasowang Aug 5, 2015
bcc8414
be2net: enable IFACE filters only after creating RXQs
Aug 5, 2015
99b4430
be2net: post buffers before destroying RXQs in Lancer
Aug 5, 2015
649886a
be2net: protect eqo->affinity_mask from getting freed twice
Aug 5, 2015
d1163e9
Merge branch 'be2net-fixes'
davem330 Aug 7, 2015
998ef5d
ARM: 8408/1: Fix the secondary_startup function in Big Endian case
gclement Aug 6, 2015
e83dd37
ARM: 8409/1: Mark ret_fast_syscall as a function
drewrichardson-arm Aug 6, 2015
95a428f
Merge tag 'batman-adv-fix-for-davem' of git://git.open-mesh.org/linux…
davem330 Aug 7, 2015
fe1e187
net/mlx5_core: Set log_uar_page_sz for non 4K page size architecture
Aug 5, 2015
2701fa0
fbdev: select versatile helpers for the integrator
linusw Jul 28, 2015
2b55cb3
OMAPDSS: Fix node refcount leak in omapdss_of_get_next_port()
Aug 7, 2015
6266f4b
OMAPDSS: Fix omap_dss_find_output_by_port_node() port refcount decrement
Aug 7, 2015
9e6e35e
video: fbdev: pxa3xx_gcu: prepare the clocks
rjarzmik Aug 3, 2015
96fffb4
netfilter: ip6t_SYNPROXY: fix NULL pointer dereference
Aug 9, 2015
3c16241
netfilter: SYNPROXY: fix sending window update to client
Jul 27, 2015
37b617f
video: Fix possible leak in of_get_videomode()
Jul 11, 2015
2a17d7e
fbcon: unconditionally initialize cursor blink interval
Aug 4, 2015
fc5fee8
x86/xen: build "Xen PV" APIC driver for domU as well
zx2c4 Aug 10, 2015
878854a
arm64: VDSO: fix coarse clock monotonicity regression
nlynch-mentor Aug 8, 2015
d53793c
net: mvpp2: remove excessive spinlocks from driver initialization
wojtas-marcin Aug 6, 2015
71ce391
net: mvpp2: enable proper per-CPU TX buffers unmapping
wojtas-marcin Aug 6, 2015
edc660f
net: mvpp2: replace TX coalescing interrupts with hrtimer
wojtas-marcin Aug 6, 2015
ea70858
Merge branch 'mvpp2-fixes'
davem330 Aug 10, 2015
ade4dc3
bna: fix interrupts storm caused by erroneous packets
Aug 6, 2015
4e7c133
netlink: make sure -EBUSY won't escape from netlink_insert
borkmann Aug 6, 2015
330567b
ipv6: don't reject link-local nexthop on other interface
Aug 7, 2015
7a76a02
net-timestamp: Update skb_complete_tx_timestamp comment
gobenji Aug 7, 2015
21a4476
cxgb4: missing curly braces in t4_setup_debugfs()
Aug 8, 2015
e161590
bnx2x: Prevent null pointer dereference on SKB release
Aug 10, 2015
0ea853d
bnx2x: Free NVRAM lock at end of each page
Aug 10, 2015
875a74b
Merge branch 'bnx2x-fixes'
davem330 Aug 10, 2015
1825545
Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf
davem330 Aug 11, 2015
9d332d9
mkiss: Fix error handling in mkiss_open()
Aug 10, 2015
2235f2a
inet: fix races with reqsk timers
Aug 10, 2015
3257d8b
inet: fix possible request socket leak
Aug 10, 2015
ad6cd7b
Revert "xen/events/fifo: Handle linked events when closing a port"
Aug 10, 2015
c22fe51
xen/xenbus: Don't leak memory when unmapping the ring on HVM backend
Aug 10, 2015
09edea4
ARM: 8410/1: VDSO: fix coarse clock monotonicity regression
nlynch-mentor Aug 10, 2015
edf15b4
Merge tag 'fbdev-fixes-4.2' of git://git.kernel.org/pub/scm/linux/ker…
torvalds Aug 11, 2015
8961822
net: fs_enet: explicitly remove I flag on TX partial frames
chleroy Aug 11, 2015
c68875f
net: fs_enet: mask interrupts for TX partial frames.
chleroy Aug 11, 2015
28eaad7
Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/ker…
davem330 Aug 11, 2015
c0ddc8c
localmodconfig: Use Kbuild files too
richardweinberger Jul 26, 2015
58ccab9
Merge tag 'localmodconfig-v4.2-rc6' of git://git.kernel.org/pub/scm/l…
torvalds Aug 11, 2015
7f518ad
dm thin metadata: delete btrees when releasing metadata snapshot
jthornber Aug 12, 2015
b0dc3c8
dm btree: add ref counting ops for the leaves of top level btrees
jthornber Aug 12, 2015
34dd051
dm cache policy smq: move 'dm-cache-default' module alias to SMQ
Aug 12, 2015
cec45d9
Merge tag 'regmap-fix-v4.2-rc6' of git://git.kernel.org/pub/scm/linux…
torvalds Aug 12, 2015
8c8bac5
drm/amdgpu: add context buffer size check for HEVC
Boyz-Radeon Aug 5, 2015
b8826b0
Revert "drm/amdgpu: Configure doorbell to maximum slots"
alexdeucher Aug 10, 2015
e037239
drm/radeon: add new OLAND pci id
alexdeucher Aug 10, 2015
04da002
Merge branch 'drm-fixes-4.2' of git://people.freedesktop.org/~agd5f/l…
torvalds Aug 12, 2015
30065bf
Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/…
torvalds Aug 12, 2015
211c504
net: dsa: Do not override PHY interface if already configured
ffainelli Aug 8, 2015
b02e3e9
bonding: Gratuitous ARP gets dropped when first slave added
Aug 11, 2015
a898fe0
gianfar: correct filer table writing
kuba-moo Aug 12, 2015
b5c8c89
gianfar: correct list membership accounting
kuba-moo Aug 12, 2015
1f2b729
gianfar: remove faulty filer optimizer
kuba-moo Aug 12, 2015
e941ba8
Merge branch 'gianfar-fixes'
davem330 Aug 12, 2015
e6d0069
cosa: missing error code on failure in probe()
Aug 12, 2015
5c16179
EDAC, ppc4xx: Access mci->csrows array elements properly
mwalle Jul 21, 2015
2331d30
Merge tag 'edac_fix_for_4.2' of git://git.kernel.org/pub/scm/linux/ke…
torvalds Aug 13, 2015
26b552e
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
torvalds Aug 13, 2015
ed596cd
Revert x86 sigcontext cleanups
torvalds Aug 13, 2015
6b476e1
Merge tag 'for-linus-4.2-rc6-tag' of git://git.kernel.org/pub/scm/lin…
torvalds Aug 13, 2015
ebcbf16
Merge branch 'for-linus' of git://git.kernel.dk/linux-block
torvalds Aug 13, 2015
5b3e2e1
Merge tag 'dm-4.2-fixes-5' of git://git.kernel.org/pub/scm/linux/kern…
torvalds Aug 13, 2015
cd88ec2
x86: fix error handling for 32-bit compat out-of-range system call nu…
torvalds Aug 13, 2015
7ddab73
Merge branch 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm
torvalds Aug 13, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions arch/arm/kernel/entry-common.S
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ work_pending:
movlt scno, #(__NR_restart_syscall - __NR_SYSCALL_BASE)
ldmia sp, {r0 - r6} @ have to reload r0 - r6
b local_restart @ ... and off we go
ENDPROC(ret_fast_syscall)

/*
* "slow" syscall return path. "why" tells us if this was a real syscall.
Expand Down
3 changes: 3 additions & 0 deletions arch/arm/kernel/head.S
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,9 @@ ENTRY(secondary_startup)
sub lr, r4, r5 @ mmu has been enabled
add r3, r7, lr
ldrd r4, [r3, #0] @ get secondary_data.pgdir
ARM_BE8(eor r4, r4, r5) @ Swap r5 and r4 in BE:
ARM_BE8(eor r5, r4, r5) @ it can be done in 3 steps
ARM_BE8(eor r4, r4, r5) @ without using a temp reg.
ldr r8, [r3, #8] @ get secondary_data.swapper_pg_dir
badr lr, __enable_mmu @ return address
mov r13, r12 @ __secondary_switched address
Expand Down
7 changes: 3 additions & 4 deletions arch/arm/kernel/vdso.c
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,6 @@ static bool tk_is_cntvct(const struct timekeeper *tk)
*/
void update_vsyscall(struct timekeeper *tk)
{
struct timespec xtime_coarse;
struct timespec64 *wtm = &tk->wall_to_monotonic;

if (!cntvct_ok) {
Expand All @@ -308,10 +307,10 @@ void update_vsyscall(struct timekeeper *tk)

vdso_write_begin(vdso_data);

xtime_coarse = __current_kernel_time();
vdso_data->tk_is_cntvct = tk_is_cntvct(tk);
vdso_data->xtime_coarse_sec = xtime_coarse.tv_sec;
vdso_data->xtime_coarse_nsec = xtime_coarse.tv_nsec;
vdso_data->xtime_coarse_sec = tk->xtime_sec;
vdso_data->xtime_coarse_nsec = (u32)(tk->tkr_mono.xtime_nsec >>
tk->tkr_mono.shift);
vdso_data->wtm_clock_sec = wtm->tv_sec;
vdso_data->wtm_clock_nsec = wtm->tv_nsec;

Expand Down
2 changes: 1 addition & 1 deletion arch/arm/vdso/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ VDSO_LDFLAGS += -Wl,-z,max-page-size=4096 -Wl,-z,common-page-size=4096
VDSO_LDFLAGS += -nostdlib -shared
VDSO_LDFLAGS += $(call cc-ldoption, -Wl$(comma)--hash-style=sysv)
VDSO_LDFLAGS += $(call cc-ldoption, -Wl$(comma)--build-id)
VDSO_LDFLAGS += $(call cc-option, -fuse-ld=bfd)
VDSO_LDFLAGS += $(call cc-ldoption, -fuse-ld=bfd)

obj-$(CONFIG_VDSO) += vdso.o
extra-$(CONFIG_VDSO) += vdso.lds
Expand Down
7 changes: 3 additions & 4 deletions arch/arm64/kernel/vdso.c
Original file line number Diff line number Diff line change
Expand Up @@ -199,16 +199,15 @@ int arch_setup_additional_pages(struct linux_binprm *bprm,
*/
void update_vsyscall(struct timekeeper *tk)
{
struct timespec xtime_coarse;
u32 use_syscall = strcmp(tk->tkr_mono.clock->name, "arch_sys_counter");

++vdso_data->tb_seq_count;
smp_wmb();

xtime_coarse = __current_kernel_time();
vdso_data->use_syscall = use_syscall;
vdso_data->xtime_coarse_sec = xtime_coarse.tv_sec;
vdso_data->xtime_coarse_nsec = xtime_coarse.tv_nsec;
vdso_data->xtime_coarse_sec = tk->xtime_sec;
vdso_data->xtime_coarse_nsec = tk->tkr_mono.xtime_nsec >>
tk->tkr_mono.shift;
vdso_data->wtm_clock_sec = tk->wall_to_monotonic.tv_sec;
vdso_data->wtm_clock_nsec = tk->wall_to_monotonic.tv_nsec;

Expand Down
3 changes: 2 additions & 1 deletion arch/x86/entry/entry_64_compat.S
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ sysexit_from_sys_call:
*/
andl $~TS_COMPAT, ASM_THREAD_INFO(TI_status, %rsp, SIZEOF_PTREGS)
movl RIP(%rsp), %ecx /* User %eip */
movq RAX(%rsp), %rax
RESTORE_RSI_RDI
xorl %edx, %edx /* Do not leak kernel information */
xorq %r8, %r8
Expand Down Expand Up @@ -219,7 +220,6 @@ sysexit_from_sys_call:
1: setbe %al /* 1 if error, 0 if not */
movzbl %al, %edi /* zero-extend that into %edi */
call __audit_syscall_exit
movq RAX(%rsp), %rax /* reload syscall return value */
movl $(_TIF_ALLWORK_MASK & ~_TIF_SYSCALL_AUDIT), %edi
DISABLE_INTERRUPTS(CLBR_NONE)
TRACE_IRQS_OFF
Expand Down Expand Up @@ -368,6 +368,7 @@ sysretl_from_sys_call:
RESTORE_RSI_RDI_RDX
movl RIP(%rsp), %ecx
movl EFLAGS(%rsp), %r11d
movq RAX(%rsp), %rax
xorq %r10, %r10
xorq %r9, %r9
xorq %r8, %r8
Expand Down
6 changes: 3 additions & 3 deletions arch/x86/include/asm/sigcontext.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ struct sigcontext {
unsigned long ip;
unsigned long flags;
unsigned short cs;
unsigned short __pad2; /* Was called gs, but was always zero. */
unsigned short __pad1; /* Was called fs, but was always zero. */
unsigned short ss;
unsigned short gs;
unsigned short fs;
unsigned short __pad0;
unsigned long err;
unsigned long trapno;
unsigned long oldmask;
Expand Down
21 changes: 3 additions & 18 deletions arch/x86/include/uapi/asm/sigcontext.h
Original file line number Diff line number Diff line change
Expand Up @@ -177,24 +177,9 @@ struct sigcontext {
__u64 rip;
__u64 eflags; /* RFLAGS */
__u16 cs;

/*
* Prior to 2.5.64 ("[PATCH] x86-64 updates for 2.5.64-bk3"),
* Linux saved and restored fs and gs in these slots. This
* was counterproductive, as fsbase and gsbase were never
* saved, so arch_prctl was presumably unreliable.
*
* If these slots are ever needed for any other purpose, there
* is some risk that very old 64-bit binaries could get
* confused. I doubt that many such binaries still work,
* though, since the same patch in 2.5.64 also removed the
* 64-bit set_thread_area syscall, so it appears that there is
* no TLS API that works in both pre- and post-2.5.64 kernels.
*/
__u16 __pad2; /* Was gs. */
__u16 __pad1; /* Was fs. */

__u16 ss;
__u16 gs;
__u16 fs;
__u16 __pad0;
__u64 err;
__u64 trapno;
__u64 oldmask;
Expand Down
26 changes: 11 additions & 15 deletions arch/x86/kernel/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,15 @@ int restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc)
COPY(r15);
#endif /* CONFIG_X86_64 */

#ifdef CONFIG_X86_32
COPY_SEG_CPL3(cs);
COPY_SEG_CPL3(ss);
#else /* !CONFIG_X86_32 */
/* Kernel saves and restores only the CS segment register on signals,
* which is the bare minimum needed to allow mixed 32/64-bit code.
* App's signal handler can save/restore other segments if needed. */
COPY_SEG_CPL3(cs);
#endif /* CONFIG_X86_32 */

get_user_ex(tmpflags, &sc->flags);
regs->flags = (regs->flags & ~FIX_EFLAGS) | (tmpflags & FIX_EFLAGS);
Expand Down Expand Up @@ -154,9 +161,8 @@ int setup_sigcontext(struct sigcontext __user *sc, void __user *fpstate,
#else /* !CONFIG_X86_32 */
put_user_ex(regs->flags, &sc->flags);
put_user_ex(regs->cs, &sc->cs);
put_user_ex(0, &sc->__pad2);
put_user_ex(0, &sc->__pad1);
put_user_ex(regs->ss, &sc->ss);
put_user_ex(0, &sc->gs);
put_user_ex(0, &sc->fs);
#endif /* CONFIG_X86_32 */

put_user_ex(fpstate, &sc->fpstate);
Expand Down Expand Up @@ -451,19 +457,9 @@ static int __setup_rt_frame(int sig, struct ksignal *ksig,

regs->sp = (unsigned long)frame;

/*
* Set up the CS and SS registers to run signal handlers in
* 64-bit mode, even if the handler happens to be interrupting
* 32-bit or 16-bit code.
*
* SS is subtle. In 64-bit mode, we don't need any particular
* SS descriptor, but we do need SS to be valid. It's possible
* that the old SS is entirely bogus -- this can happen if the
* signal we're trying to deliver is #GP or #SS caused by a bad
* SS value.
*/
/* Set up the CS register to run signal handlers in 64-bit mode,
even if the handler happens to be interrupting 32-bit code. */
regs->cs = __USER_CS;
regs->ss = __USER_DS;

return 0;
}
Expand Down
4 changes: 2 additions & 2 deletions arch/x86/xen/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ CFLAGS_mmu.o := $(nostackp)
obj-y := enlighten.o setup.o multicalls.o mmu.o irq.o \
time.o xen-asm.o xen-asm_$(BITS).o \
grant-table.o suspend.o platform-pci-unplug.o \
p2m.o
p2m.o apic.o

obj-$(CONFIG_EVENT_TRACING) += trace.o

obj-$(CONFIG_SMP) += smp.o
obj-$(CONFIG_PARAVIRT_SPINLOCKS)+= spinlock.o
obj-$(CONFIG_XEN_DEBUG_FS) += debugfs.o
obj-$(CONFIG_XEN_DOM0) += apic.o vga.o
obj-$(CONFIG_XEN_DOM0) += vga.o
obj-$(CONFIG_SWIOTLB_XEN) += pci-swiotlb-xen.o
obj-$(CONFIG_XEN_EFI) += efi.o
6 changes: 2 additions & 4 deletions arch/x86/xen/xen-ops.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,17 +101,15 @@ struct dom0_vga_console_info;

#ifdef CONFIG_XEN_DOM0
void __init xen_init_vga(const struct dom0_vga_console_info *, size_t size);
void __init xen_init_apic(void);
#else
static inline void __init xen_init_vga(const struct dom0_vga_console_info *info,
size_t size)
{
}
static inline void __init xen_init_apic(void)
{
}
#endif

void __init xen_init_apic(void);

#ifdef CONFIG_XEN_EFI
extern void xen_efi_init(void);
#else
Expand Down
19 changes: 14 additions & 5 deletions drivers/base/regmap/regcache-rbtree.c
Original file line number Diff line number Diff line change
Expand Up @@ -296,11 +296,20 @@ static int regcache_rbtree_insert_to_block(struct regmap *map,
if (!blk)
return -ENOMEM;

present = krealloc(rbnode->cache_present,
BITS_TO_LONGS(blklen) * sizeof(*present), GFP_KERNEL);
if (!present) {
kfree(blk);
return -ENOMEM;
if (BITS_TO_LONGS(blklen) > BITS_TO_LONGS(rbnode->blklen)) {
present = krealloc(rbnode->cache_present,
BITS_TO_LONGS(blklen) * sizeof(*present),
GFP_KERNEL);
if (!present) {
kfree(blk);
return -ENOMEM;
}

memset(present + BITS_TO_LONGS(rbnode->blklen), 0,
(BITS_TO_LONGS(blklen) - BITS_TO_LONGS(rbnode->blklen))
* sizeof(*present));
} else {
present = rbnode->cache_present;
}

/* insert the register value in the correct place in the rbnode block */
Expand Down
4 changes: 2 additions & 2 deletions drivers/block/xen-blkback/blkback.c
Original file line number Diff line number Diff line change
Expand Up @@ -369,8 +369,8 @@ static void purge_persistent_gnt(struct xen_blkif *blkif)
return;
}

if (work_pending(&blkif->persistent_purge_work)) {
pr_alert_ratelimited("Scheduled work from previous purge is still pending, cannot purge list\n");
if (work_busy(&blkif->persistent_purge_work)) {
pr_alert_ratelimited("Scheduled work from previous purge is still busy, cannot purge list\n");
return;
}

Expand Down
Loading