Ivan Safonov | 10 Oct 08:28 2015

[PATCH 3/3] staging: rtl8188eu: BITn macro replaced by BIT(n) in hal/rtl8188e_hal_init.c

This patch replace BITn macro to BIT(n).

Signed-off-by: Ivan Safonov <insafonov <at> gmail.com>
 drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c | 26 ++++++++++++-----------
 1 file changed, 14 insertions(+), 12 deletions(-)

diff --git a/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c b/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c
index 46e0fdd..5d5e192 100644
--- a/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c
+++ b/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c
 <at>  <at>  -106,8 +106,8  <at>  <at>  void _8051Reset88E(struct adapter *padapter)
 	u8 u1bTmp;

 	u1bTmp = usb_read8(padapter, REG_SYS_FUNC_EN+1);
-	usb_write8(padapter, REG_SYS_FUNC_EN+1, u1bTmp&(~BIT2));
-	usb_write8(padapter, REG_SYS_FUNC_EN+1, u1bTmp|(BIT2));
+	usb_write8(padapter, REG_SYS_FUNC_EN + 1, u1bTmp & ~BIT(2));
+	usb_write8(padapter, REG_SYS_FUNC_EN + 1, u1bTmp | BIT(2));
 	DBG_88E("=====> _8051Reset88E(): 8051 reset success .\n");

 <at>  <at>  -184,10 +184,12  <at>  <at>  static void hal_notch_filter_8188e(struct adapter *adapter, bool enable)
 	if (enable) {
 		DBG_88E("Enable notch filter\n");
-		usb_write8(adapter, rOFDM0_RxDSP+1, usb_read8(adapter, rOFDM0_RxDSP+1) | BIT1);
+		usb_write8(adapter, rOFDM0_RxDSP + 1,
+		           usb_read8(adapter, rOFDM0_RxDSP + 1) | BIT(1));
 	} else {
(Continue reading)

Masanari Iida | 10 Oct 07:17 2015

[PATCH] ASoc: sh: Fit typo in Kconfig


Signed-off-by: Masanari Iida <standby24x7 <at> gmail.com>
 sound/soc/sh/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/sh/Kconfig b/sound/soc/sh/Kconfig
index 6ca90aa..206d1ed 100644
--- a/sound/soc/sh/Kconfig
+++ b/sound/soc/sh/Kconfig
 <at>  <at>  -41,7 +41,7  <at>  <at>  config SND_SOC_RCAR
 	select REGMAP_MMIO
-	  This option enables R-Car SUR/SCU/SSIU/SSI sound support
+	  This option enables R-Car SRU/SCU/SSIU/SSI sound support

 	tristate "Renesas Sampling Rate Convert Sound Card"


Figo | 10 Oct 12:36 2015

[PATCH 1/1] I have a board it block on i8259A_shutdown when I want to poweroff. It is not always re-produce.

There is the log:
[   27.758391] xhci_hcd 0000:00:14.0: shutdown start
[   27.768329] xhci_hcd 0000:00:14.0: shutdown stop
[   27.773532] pci 0000:00:0b.0: shutdown start
[   27.778335] pci 0000:00:0b.0: shutdown stop
[   27.783041] pci 0000:00:0a.0: shutdown start
[   27.787847] pci 0000:00:0a.0: shutdown stop
[   27.792550] pci 0000:00:03.0: shutdown start
[   27.797362] pci 0000:00:03.0: shutdown stop
[   27.802087] i915 0000:00:02.0: shutdown start
[   27.816006] i915 0000:00:02.0: shutdown stop
[   27.832384] PM: Calling mce_syscore_shutdown+0x0/0x50 start
[   27.838651] PM: Calling mce_syscore_shutdown+0x0/0x50 stop
[   27.844813] PM: Calling i8259A_shutdown+0x0/0x20 start

It seems has a potential race on i8259A_shutdown().

Signed-off-by: Figo <tianfei.zhang <at> intel.com>
 arch/x86/kernel/i8259.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/x86/kernel/i8259.c b/arch/x86/kernel/i8259.c
index 16cb827..06906d4 100644
--- a/arch/x86/kernel/i8259.c
+++ b/arch/x86/kernel/i8259.c
 <at>  <at>  -257,12 +257,16  <at>  <at>  static int i8259A_suspend(void)

 static void i8259A_shutdown(void)
(Continue reading)

iSayor | 10 Oct 04:30 2015


yalin wang | 10 Oct 04:01 2015

[RFC V2] arm: add relocate initrd support

Add support for initrd on ARM arch, in case
mem= boot option change the memory size or the initrd are
not placed in low memory region, we need copy the initrd
to low memory region.

Signed-off-by: yalin wang <yalin.wang2010 <at> gmail.com>
 arch/arm/include/asm/fixmap.h |  1 +
 arch/arm/kernel/setup.c       | 70 +++++++++++++++++++++++++++++++++++++++++++
 drivers/of/fdt.c              |  2 ++
 include/linux/initrd.h        |  1 +
 init/do_mounts_initrd.c       |  2 ++
 5 files changed, 76 insertions(+)

diff --git a/arch/arm/include/asm/fixmap.h b/arch/arm/include/asm/fixmap.h
index 58cfe9f..18ad90f 100644
--- a/arch/arm/include/asm/fixmap.h
+++ b/arch/arm/include/asm/fixmap.h
 <at>  <at>  -10,6 +10,7  <at>  <at> 

 enum fixed_addresses {

 	FIX_KMAP_BEGIN = __end_of_permanent_fixed_addresses,
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
index 20edd34..036473b 100644
--- a/arch/arm/kernel/setup.c
+++ b/arch/arm/kernel/setup.c
(Continue reading)

Dave Goel | 10 Oct 04:00 2015

[Linux] Linux PID algorithm is BRAINDEAD!

Pardon the subject line!  I think the PID algo. is actually pretty
good and cheap.

I just think that a very minor tweak could actually make it *actually* do
what it always intended to do (that is, satisfy the PID-AIM listed below)!
No expanded PID renumbering, no incompatibility introduction, nothing, just
a relatively *minor tweak*.


PROBLEM:  PID gets re-used immediately as soon as it is freed.

EXAMPLE: My program with PID 1323 uses temporary files that are of the form
PID-<something>. It finishes in two days By this time, linux has circled
PIDs back around five times. And, the counter happens to be right at 1323
right as the program finishes. As soon as the PID is freed, Linux thus
re-uses the PID 1323. A trash-cleaner program (I know, I know) gets
confused. 1323 exited uncleanly. The cleaner sees no 1323 running. It then
proceeds to delete the temp files. But, by that time, the kernel started
another 1323 which happens to use the very files. The cleaner ends up
deleting files for the wrong, running program!

This is just one example. There are many more examples of race conditions.


The kernel already tries to do the right thing. The only minor tweak needed
is that:

***When Linux Re-Uses A Pid, It Uses The Pid That Has Been Free For
(Continue reading)

Konrad Rzeszutek Wilk | 10 Oct 03:14 2015

[GIT PULL] (swiotlb) stable/for-linus-4.3

Hey Linus,

Please git pull the following branch:

git://git.kernel.org/pub/scm/linux/kernel/git/konrad/swiotlb.git  stable/for-linus-4.3

which enables the SWIOTLB under 32-bit PAE kernels. Nowadays most
distros enable this due to CONFIG_HYPERVISOR|CONFIG_XEN=y which
select SWIOTLB. But for those that are not interested in virtualization
and wanting to use 32-bit PAE kernels and wanting to have working DMA operations
- this configures it for them.

 arch/x86/Kconfig | 1 +
 1 file changed, 1 insertion(+)

Christian Melki (1):
      swiotlb: Enable it under x86 PAE

Jaegeuk Kim | 10 Oct 00:55 2015

[PATCH] f2fs: set GFP_NOFS for grab_cache_page

For normal inodes, their pages are allocated with __GFP_FS, which can cause
filesystem calls when reclaiming memory.
This can incur a dead lock condition accordingly.

So, this patch addresses this problem by introducing
f2fs_grab_cache_page(.., bool for_write), which calls
grab_cache_page_write_begin() with AOP_FLAG_NOFS.

Signed-off-by: Jaegeuk Kim <jaegeuk <at> kernel.org>
 fs/f2fs/data.c | 16 +++++++++-------
 fs/f2fs/dir.c  |  6 +++---
 fs/f2fs/f2fs.h | 12 ++++++++++--
 fs/f2fs/file.c |  6 +++---
 fs/f2fs/gc.c   |  6 +++---
 5 files changed, 28 insertions(+), 18 deletions(-)

diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index bc04e92..d4f1c74 100644
--- a/fs/f2fs/data.c
+++ b/fs/f2fs/data.c
 <at>  <at>  -275,7 +275,8  <at>  <at>  int f2fs_get_block(struct dnode_of_data *dn, pgoff_t index)
 	return f2fs_reserve_block(dn, index);

-struct page *get_read_data_page(struct inode *inode, pgoff_t index, int rw)
+struct page *get_read_data_page(struct inode *inode, pgoff_t index,
+						int rw, bool for_write)
 	struct address_space *mapping = inode->i_mapping;
(Continue reading)

Marc Zyngier | 10 Oct 00:52 2015

[PULL v2] GIC changes for Linux 4.4

Hi Thomas, Jason,

Here's the pull request for the GIC updates I stashed over the past
few weeks. Only real new feature is the 32bit support from
Jean-Philippe, the rest is all about dealing with errata and firmware.

Please pull!



The following changes since commit 0e841b04c829f59a5d5745f98d2857f48882efe9:

  irqchip/sunxi-nmi: Switch to of_io_request_and_map() from of_iomap() (2015-10-09 22:47:28 +0200)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git tags/gic-4.4

for you to fetch changes up to 4f64cb65bf76fbd89c62d8e69c7bf75091950739:

  arm/arm64: KVM: Only allow 64bit hosts to build VGICv3 (2015-10-09 23:11:57 +0100)

GIC updates for Linux 4.4:

- Enable basic GICv3 support on 32bit ARM (mostly for running VMs with
  more than 8 virtual CPUs)
- arm64 changes to deal with firmware limitations that forces a GICv3
(Continue reading)

Alexey Khoroshilov | 10 Oct 00:37 2015

[PATCH] staging: r8188eu: Add _enter_critical_mutex() error handling

_enter_critical_mutex() is a simple call to mutex_lock_interruptible(),
but there is no error handling code for it.

The patch removes wrapper _enter_critical_mutex() and
adds error handling for mutex_lock_interruptible().

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov <at> ispras.ru>
 drivers/staging/rtl8188eu/core/rtw_mlme_ext.c     | 5 +++--
 drivers/staging/rtl8188eu/include/osdep_service.h | 9 ---------
 drivers/staging/rtl8188eu/os_dep/os_intfs.c       | 3 ++-
 drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c  | 5 ++++-
 4 files changed, 9 insertions(+), 13 deletions(-)

diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
index 935b48eef8b1..4e9312f0e902 100644
--- a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
+++ b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
 <at>  <at>  -271,7 +271,8  <at>  <at>  static s32 dump_mgntframe_and_wait_ack(struct adapter *padapter,
 	if (padapter->bSurpriseRemoved || padapter->bDriverStopped)
 		return -1;

-	_enter_critical_mutex(&pxmitpriv->ack_tx_mutex, NULL);
+	if (!mutex_lock_interruptible(&pxmitpriv->ack_tx_mutex))
+		return _FAIL;
 	pxmitpriv->ack_tx = true;

 	pmgntframe->ack_report = 1;
(Continue reading)

Alexander Morozov | 9 Oct 21:34 2015

[PATCH 0/2] Fix hardlinks in overlay

There were reports that overlay doesn't work very well with unix-sockets.
In particular you can't access unix-socket through hardlink on overlay fs.
Problem is that overlay creates different inodes for hardlinks and code in
net/unix/af_unix.c relies on inodes for unix-socket lookup. I think this
affects any code which relies on inodes from kern_path. There is helper
d_backing_inode, which I think supposed to get inodes from underlying fs
(for example ext4), but in current implementation it does nothing.  These
patches made on top of v4.3-rc4 of main linux tree (master is broken for my
ubuntu VM), but I tested that they applying on master and there was no
changes to overlay since v4.3-rc4.

Alexander Morozov (2):
  fs/overlay: move update and instantiate dentry code to function
  fs/overlay: use same inodes for hardlinks

 fs/overlayfs/dir.c | 41 +++++++++++++++++++++++++++++------------
 1 file changed, 29 insertions(+), 12 deletions(-)