Re: [PATCH v3] adm8211: fix checkpatch error for trailing statements on next line

2015-05-04 Thread Joe Perches
On Tue, 2015-05-05 at 07:01 +0100, Okash Khawaja wrote: > This patch fixes the checkpatch.pl error: Please fix the space/tab use too. Your email client seems to have converted all the tabs to spaces. default should use the same indent as the case statements > diff --git a/drivers/net/wireless/

Re: [PATCH 3.14 73/92] dm crypt: fix deadlock when async crypto algorithm returns -EBUSY

2015-05-04 Thread Milan Broz
On 05/05/2015 05:22 AM, Mike Snitzer wrote: > On Mon, May 04 2015 at 5:32pm -0400, > Rabin Vincent wrote: > >> On Sat, May 02, 2015 at 09:03:28PM +0200, Greg Kroah-Hartman wrote: >>> 3.14-stable review patch. If anyone has any objections, please let me know. >>> >>> -- >>> >>> F

Re: [PATCH] USB: usbmon: Use 64bit timestamp for mon_bin_hdr

2015-05-04 Thread Tina Ruchandani
> but the timestamp will also overflow. So what is the point? > The 32-bit timestamp obtained using do_gettimeofday() will overflow in year 2038. However, with 64-bit timestamps, we get practically infinite time. mon_bin_hdr already has support for a 64-bit seconds timestamp. This patch changes ho

Re: [PATCH v3 4/6] cpufreq: powernv: Call throttle_check() on receiving OCC_THROTTLE

2015-05-04 Thread Shilpasri G Bhat
Hi Preeti, On 05/05/2015 09:30 AM, Preeti U Murthy wrote: > Hi Shilpa, > > On 05/04/2015 02:24 PM, Shilpasri G Bhat wrote: >> Re-evaluate the chip's throttled state on recieving OCC_THROTTLE >> notification by executing *throttle_check() on any one of the cpu on >> the chip. This is a sanity chec

[PATCH] serial: 8250: Do nothing if nr_uarts=0

2015-05-04 Thread Jan Kiszka
When nr_uarts was set to 0 (via config or 8250_core.nr_uarts), we crash early on x86 because serial8250_isa_init_ports dereferences base_ops which remains NULL. In fact, there is nothing to do for all the callers of serial8250_isa_init_ports if there are no uarts. Based on suggestions by Peter Hur

Re: [PATCH] USB: usbmon: Use 64bit timestamp for mon_bin_hdr

2015-05-04 Thread Oliver Neukum
On Tue, 2015-05-05 at 11:50 +0530, Tina Ruchandani wrote: > struct mon_bin_hdr allows for a 64-bit seconds timestamp. The code > currently uses 'struct timeval' to populate the timestamp in mon_bin_hdr, > which has a 32-bit seconds field and will overflow in year 2038 and beyond. > This patch rep

Re: [PATCH 1/3] amba: add no_pm_pclk_management flag to amba_driver

2015-05-04 Thread Robert Baldyga
On 04/16/2015 03:41 PM, Russell King - ARM Linux wrote: > On Thu, Apr 16, 2015 at 03:39:12PM +0200, Robert Baldyga wrote: >> This patch introduces no_pm_pclk_management flag in struct amba_driver. >> It causes that pclk is not touched in pm_runtime callbacks. This allows >> to manage clock in devic

[PATCH] USB: usbmon: Use 64bit timestamp for mon_bin_hdr

2015-05-04 Thread Tina Ruchandani
struct mon_bin_hdr allows for a 64-bit seconds timestamp. The code currently uses 'struct timeval' to populate the timestamp in mon_bin_hdr, which has a 32-bit seconds field and will overflow in year 2038 and beyond. This patch replaces 'struct timeval' with 'struct timespec64' which is y2038 sa

Re: [PATCH v10 0/10] iommu/vt-d: Fix intel vt-d faults in kdump kernel

2015-05-04 Thread Dave Young
On 05/04/15 at 06:23pm, Joerg Roedel wrote: > On Fri, Apr 24, 2015 at 04:49:57PM +0800, Dave Young wrote: > > I'm more than happy to see this issue can be fixed in the patchset, I > > do not agree to add the code there with such problems. OTOH, for now > > seems there's no way to fix it. > > And t

Re: [RFC PATCH 00/22] perf tools: introduce 'perf bpf' command to load eBPF programs.

2015-05-04 Thread Wang Nan
On 2015/5/5 13:49, Alexei Starovoitov wrote: > On 5/4/15 9:41 PM, Wang Nan wrote: >> >> That's great. Could you please append the description of 'llvm -s' into your >> README >> or comments? It has cost me a lot of time for dumping eBPF instructions so I >> decide to >> add it into perf... > > s

Re: [RFC kgr on klp 0/9] kGraft on the top of KLP

2015-05-04 Thread Jiri Kosina
On Mon, 4 May 2015, Josh Poimboeuf wrote: > > - the "immediate" one, where the code redirection flip is switched > > unconditionally and immediately (i.e. exactly what we currently have in > > Linus' tree); semantically applicable to many patches, but not all of > > them > > > > - someth

[PATCH] USB: usbmon: Remove timeval usage for timestamp

2015-05-04 Thread Tina Ruchandani
'struct timeval' uses 32-bits for its seconds field and will overflow in the year 2038 and beyond. This patch replaces the usage of 'struct timeval' in mon_get_timestamp() with timespec64 which uses a 64-bit seconds field and is y2038-safe. mon_get_timestamp() truncates the timestamp at 4096 second

Re: [PATCH v9 0/10] iommu/vt-d: Fix intel vt-d faults in kdump kernel

2015-05-04 Thread Dave Young
On 05/04/15 at 01:05pm, Joerg Roedel wrote: > On Fri, Apr 03, 2015 at 04:40:31PM +0800, Dave Young wrote: > > Have not read all the patches, but I have a question, not sure this > > has been answered before. Old memory is not reliable, what if the old > > memory get corrupted before panic? Is it sa

Re: [PATCH v3 1/6] cpufreq: poowernv: Handle throttling due to Pmax capping at chip level

2015-05-04 Thread Shilpasri G Bhat
Hi Preeti, On 05/05/2015 09:21 AM, Preeti U Murthy wrote: > Hi Shilpa, > > On 05/04/2015 02:24 PM, Shilpasri G Bhat wrote: >> The On-Chip-Controller(OCC) can throttle cpu frequency by reducing the >> max allowed frequency for that chip if the chip exceeds its power or >> temperature limits. As Pm

Re: A desktop environment[1] kernel wishlist

2015-05-04 Thread Tomeu Vizoso
On 5 May 2015 at 00:19, Rafael J. Wysocki wrote: > On Friday, May 01, 2015 11:02:19 AM Tomeu Vizoso wrote: >> On 30 April 2015 at 20:54, Chirantan Ekbote wrote: >> > On Thu, Apr 30, 2015 at 10:23 AM, Olof Johansson wrote: >> >> Hi, >> >> >> >> On Thu, Apr 30, 2015 at 10:10 AM, John Stultz >> >

Re: [PATCH] sched: Relax a restriction in sched_rt_can_attach()

2015-05-04 Thread Mike Galbraith
On Tue, 2015-05-05 at 11:46 +0800, Zefan Li wrote: > On 2015/5/4 22:09, Mike Galbraith wrote: > > On Mon, 2015-05-04 at 14:37 +0200, Peter Zijlstra wrote: > >> On Mon, May 04, 2015 at 05:11:10PM +0800, Zefan Li wrote: > >> > >>> Some degree of flexibility is provided so that you may disable some >

[PATCH v3] adm8211: fix checkpatch error for trailing statements on next line

2015-05-04 Thread Okash Khawaja
This patch fixes the checkpatch.pl error: ERROR: trailing statements should be on next line More specifically, the fix has been applied to the four occurances of the error listed below. ERROR: trailing statements should be on next line #1101: FILE: drivers/net/wireless/adm8211.c:1101: +

Re: [PATCH v2 2/2] staging: ion: chunk_heap: use %pad for printing dma_addr_t's

2015-05-04 Thread Mitchel Humpherys
On Mon, May 04 2015 at 01:05:50 PM, Colin Cross wrote: > On Mon, May 4, 2015 at 1:22 AM, Dan Carpenter > wrote: >> On Thu, Apr 09, 2015 at 06:10:04PM -0700, Mitchel Humpherys wrote: >>> We're currently using %lu and %ld to print some variables of type >>> dma_addr_t, which results in the followi

Re: [PATCH v17 1/2] sys_membarrier(): system-wide memory barrier (generic, x86)

2015-05-04 Thread Michael Kerrisk (man-pages)
[CC += linux-...@vger.kernel.org] Since this is a kernel-user-space API change, please CC linux-api@. The kernel source file Documentation/SubmitChecklist notes that all Linux kernel patches that change userspace interfaces should be CCed to linux-...@vger.kernel.org, so that the various parties w

Re: [PATCH] rcu: declare rcu_data variables in the section they are defined in

2015-05-04 Thread Paul E. McKenney
On Tue, May 05, 2015 at 08:40:55AM +0800, Nicolas Iooss wrote: > On 05/05/2015 04:33 AM, Paul E. McKenney wrote: > > On Sun, May 03, 2015 at 12:27:02PM -0700, Josh Triplett wrote: > >> On Sun, May 03, 2015 at 05:57:53PM +0800, Nicolas Iooss wrote: > >>> Commit 11bbb235c26f ("rcu: Use DEFINE_PER_CPU

Re: question about RCU dynticks_nesting

2015-05-04 Thread Paul E. McKenney
On Mon, May 04, 2015 at 04:53:16PM -0400, Rik van Riel wrote: > On 05/04/2015 04:38 PM, Paul E. McKenney wrote: > > On Mon, May 04, 2015 at 04:13:50PM -0400, Rik van Riel wrote: > >> On 05/04/2015 04:02 PM, Paul E. McKenney wrote: > > >>> Hmmm... But didn't earlier performance measurements show t

Re: [RFC PATCH 00/22] perf tools: introduce 'perf bpf' command to load eBPF programs.

2015-05-04 Thread Alexei Starovoitov
On 5/4/15 9:41 PM, Wang Nan wrote: That's great. Could you please append the description of 'llvm -s' into your README or comments? It has cost me a lot of time for dumping eBPF instructions so I decide to add it into perf... sure. it's just -filetype=asm flag to llc instead of -filetype=obj

Re: Patch breaks suspend

2015-05-04 Thread Aaron Lu
On Tue, May 05, 2015 at 01:37:33AM +0200, Rafael J. Wysocki wrote: > On Saturday, May 02, 2015 11:27:32 PM Marian Marinov wrote: > > Hi guys, > > I have Lenovo T520 with one SSD and one SATA drive. > > > > I tried to upgrade to Linux 4.0 and found that after suspend and resume I > > can't access

[PATCH 06/79] ext2: use simple_follow_link()

2015-05-04 Thread Al Viro
From: Al Viro Signed-off-by: Al Viro --- fs/ext2/inode.c | 1 + fs/ext2/namei.c | 3 ++- fs/ext2/symlink.c | 10 +- 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/fs/ext2/inode.c b/fs/ext2/inode.c index f460ae3..5c09776 100644 --- a/fs/ext2/inode.c +++ b/fs/ext2/i

[PATCH 13/79] ufs: switch to simple_follow_link()

2015-05-04 Thread Al Viro
From: Al Viro Signed-off-by: Al Viro --- fs/ufs/inode.c | 5 +++-- fs/ufs/namei.c | 3 ++- fs/ufs/symlink.c | 13 + 3 files changed, 6 insertions(+), 15 deletions(-) diff --git a/fs/ufs/inode.c b/fs/ufs/inode.c index be7d42c..99aaf5c 100644 --- a/fs/ufs/inode.c +++ b/fs/ufs/i

[PATCH 14/79] ubifs: switch to simple_follow_link()

2015-05-04 Thread Al Viro
From: Al Viro Signed-off-by: Al Viro --- fs/ubifs/dir.c | 1 + fs/ubifs/file.c | 11 +-- fs/ubifs/super.c | 1 + 3 files changed, 3 insertions(+), 10 deletions(-) diff --git a/fs/ubifs/dir.c b/fs/ubifs/dir.c index 27060fc..5c27c66 100644 --- a/fs/ubifs/dir.c +++ b/fs/ubifs/dir.c @

[PATCH 08/79] ext3: switch to simple_follow_link()

2015-05-04 Thread Al Viro
From: Al Viro Signed-off-by: Al Viro --- fs/ext3/inode.c | 1 + fs/ext3/namei.c | 3 ++- fs/ext3/symlink.c | 10 +- 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/fs/ext3/inode.c b/fs/ext3/inode.c index 2ee2dc4..6c7e546 100644 --- a/fs/ext3/inode.c +++ b/fs/ext3/i

[PATCH 16/79] jfs: switch to simple_follow_link()

2015-05-04 Thread Al Viro
From: Al Viro Signed-off-by: Al Viro --- fs/jfs/inode.c | 3 ++- fs/jfs/namei.c | 5 ++--- fs/jfs/symlink.c | 10 +- 3 files changed, 5 insertions(+), 13 deletions(-) diff --git a/fs/jfs/inode.c b/fs/jfs/inode.c index 070dc4b..6f1cb2b 100644 --- a/fs/jfs/inode.c +++ b/fs/jfs/inod

[PATCH 21/79] SECURITY: remove nameidata arg from inode_follow_link.

2015-05-04 Thread Al Viro
From: NeilBrown No ->inode_follow_link() methods use the nameidata arg, and it is about to become private to namei.c. So remove from all inode_follow_link() functions. Signed-off-by: NeilBrown Signed-off-by: Al Viro --- fs/namei.c | 2 +- include/linux/security.h | 9 +++--

[PATCH 20/79] logfs: fix a pagecache leak for symlinks

2015-05-04 Thread Al Viro
From: Al Viro Signed-off-by: Al Viro --- fs/logfs/dir.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/logfs/dir.c b/fs/logfs/dir.c index 4cf38f1..f9b45d4 100644 --- a/fs/logfs/dir.c +++ b/fs/logfs/dir.c @@ -779,6 +779,7 @@ fail: const struct inode_operations logfs_symlink_iops = {

[PATCH 39/79] link_path_walk: don't bother with walk_component() after jumping link

2015-05-04 Thread Al Viro
From: Al Viro ... it does nothing if nd->last_type is LAST_BIND. Signed-off-by: Al Viro --- fs/namei.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/fs/namei.c b/fs/namei.c index ea528ca..d6235ea 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -1789,7 +1789,11 @@ s

[PATCH 45/79] link_path_walk: split "return from recursive call" path

2015-05-04 Thread Al Viro
From: Al Viro Signed-off-by: Al Viro --- fs/namei.c | 40 +--- 1 file changed, 17 insertions(+), 23 deletions(-) diff --git a/fs/namei.c b/fs/namei.c index 3c622ad..723dead 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -1818,23 +1818,6 @@ Walked:

[PATCH 37/79] namei: rename follow_link to trailing_symlink, move it down

2015-05-04 Thread Al Viro
From: Al Viro Signed-off-by: Al Viro --- fs/namei.c | 62 ++ 1 file changed, 30 insertions(+), 32 deletions(-) diff --git a/fs/namei.c b/fs/namei.c index a13e47d..7537ae0 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -668,8 +668,6 @@ st

[PATCH 44/79] link_path_walk: kill the recursion

2015-05-04 Thread Al Viro
From: Al Viro absolutely straightforward now - the only variables we need to preserve across the recursive call are name, link and cookie, and recursion depth is limited (and can is equal to nd->depth). So arrange an array of triples to hold instances of those and be done with that. Signed-off-

[PATCH 28/79] namei: lift nameidata into filename_mountpoint()

2015-05-04 Thread Al Viro
From: Al Viro when we go for on-demand allocation of saved state in link_path_walk(), we'll want nameidata to stay around for all 3 calls of path_mountpoint(). Signed-off-by: Al Viro --- fs/namei.c | 28 +--- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git

[PATCH 26/79] namei: get rid of lookup_hash()

2015-05-04 Thread Al Viro
From: Al Viro it's a convenient helper, but we'll want to shift nameidata down the call chain, so it won't be available there... Signed-off-by: Al Viro --- fs/namei.c | 20 +--- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/fs/namei.c b/fs/namei.c index 02b7952

[PATCH 24/79] do_last: kill symlink_ok

2015-05-04 Thread Al Viro
From: Al Viro When O_PATH is present, O_CREAT isn't, so symlink_ok is always equal to (open_flags & O_PATH) && !(nd->flags & LOOKUP_FOLLOW). Signed-off-by: Al Viro --- fs/namei.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/fs/namei.c b/fs/namei.c index 308f325..58

[PATCH 35/79] namei: expand the call of follow_link() in link_path_walk()

2015-05-04 Thread Al Viro
From: Al Viro ... and strip __always_inline from follow_link() - remaining callers don't need that. Now link_path_walk() recursion is a direct one. Signed-off-by: Al Viro --- fs/namei.c | 26 ++ 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/fs/namei.c

[PATCH 30/79] namei.c: separate the parts of follow_link() that find the link body

2015-05-04 Thread Al Viro
From: Al Viro Split a piece of fs/namei.c:follow_link() that does obtaining the link body into a separate function. follow_link() itself is converted to calling get_link() and then doing the body traversal (if any). The next step will expand follow_link() call in link_path_walk() and this helps

[PATCH 25/79] do_last: regularize the logics around following symlinks

2015-05-04 Thread Al Viro
From: Al Viro With LOOKUP_FOLLOW we unlazy and return 1; without it we either fail with ELOOP or, for O_PATH opens, succeed. No need to mix those cases... Signed-off-by: Al Viro --- fs/namei.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/fs/namei.c b/fs/n

[PATCH 32/79] namei: introduce nameidata->link

2015-05-04 Thread Al Viro
From: Al Viro shares space with nameidata->next, walk_component() et.al. store the struct path of symlink instead of returning it into a variable passed by caller. Signed-off-by: Al Viro --- fs/namei.c | 62 ++ 1 file changed, 34 inse

[PATCH 46/79] link_path_walk: cleanup - turn goto start; into continue;

2015-05-04 Thread Al Viro
From: Al Viro Deal with skipping leading slashes before what used to be the recursive call. That way we can get rid of that goto completely. Signed-off-by: Al Viro --- fs/namei.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/fs/namei.c b/fs/namei.c index 723dead

[PATCH 72/79] namei: move link count check and stack allocation into pick_link()

2015-05-04 Thread Al Viro
From: Al Viro Signed-off-by: Al Viro --- fs/namei.c | 27 --- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/fs/namei.c b/fs/namei.c index 026d7df..9822b37 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -891,16 +891,10 @@ const char *get_link(struct nameida

[PATCH 48/79] namei: trim redundant arguments of trailing_symlink()

2015-05-04 Thread Al Viro
From: Al Viro Signed-off-by: Al Viro --- fs/namei.c | 21 - 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/fs/namei.c b/fs/namei.c index e6d54ec..22256ef 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -1963,14 +1963,15 @@ static void path_cleanup(struct nameidat

Re: [PATCH 6/7] ARM: dts: mt8135: enable basic SMP bringup for mt8135

2015-05-04 Thread Yingjoe Chen
On Mon, 2015-05-04 at 16:31 +0200, Sascha Hauer wrote: > On Fri, May 01, 2015 at 03:43:29PM +0800, Yingjoe Chen wrote: > > Add arch timer node to enable arch-timer support. MT8135 firmware > > doesn't correctly setup arch-timer frequency and CNTVOFF, add > > properties to workaround this. > > > >

Re: [PATCH 3.2 059/221] autofs4: check dev ioctl size before allocating

2015-05-04 Thread Ian Kent
On Tue, 2015-05-05 at 02:16 +0100, Ben Hutchings wrote: > 3.2.69-rc1 review patch. If anyone has any objections, please let me know. Perhaps you should also consider including commit 0a280962 along with this one. > > -- > > From: Sasha Levin > > commit e53d77eb8bb616e903e34cc

Re: [PATCHv2] power_supply: Add support for Richtek rt9455 battery charger

2015-05-04 Thread Krzysztof Kozłowski
2015-05-05 0:22 GMT+09:00 Laurentiu Palcu : > Hi Anda, > > Can you please use a decent mail client to reply to emails? It was > really hard for me to figure out which were my comments and which were > yours... And I tested 3 different clients: mutt, evolution and > outlook(the web app). > > More co

[PATCH 57/79] get_link: nd->depth massage, part 6

2015-05-04 Thread Al Viro
From: Al Viro make get_link() increment nd->depth on successful exit Signed-off-by: Al Viro --- fs/namei.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/fs/namei.c b/fs/namei.c index 51bcbec..f81a029 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -918,8 +918,10 @@ const

[PATCH 53/79] link_path_walk: nd->depth massage, part 2

2015-05-04 Thread Al Viro
From: Al Viro collapse adjacent increment/decrement pairs. Signed-off-by: Al Viro --- fs/namei.c | 8 1 file changed, 8 deletions(-) diff --git a/fs/namei.c b/fs/namei.c index da23835..d8ad004 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -1824,8 +1824,6 @@ Walked:

[PATCH 49/79] namei: trim redundant arguments of fs/namei.c:put_link()

2015-05-04 Thread Al Viro
From: Al Viro Signed-off-by: Al Viro --- fs/namei.c | 25 + 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/fs/namei.c b/fs/namei.c index 22256ef..f0066785 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -718,12 +718,13 @@ void nd_jump_link(struct nameidata *

[PATCH 59/79] put_link: nd->depth massage, part 8

2015-05-04 Thread Al Viro
From: Al Viro all calls are preceded by decrement of nd->depth; move it into put_link() itself. Signed-off-by: Al Viro --- fs/namei.c | 18 -- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/fs/namei.c b/fs/namei.c index b7b1c2b..0713961 100644 --- a/fs/namei.c +

[PATCH 41/79] link_path_walk: massage a bit more

2015-05-04 Thread Al Viro
From: Al Viro Pull the block after the if-else in the end of what used to be do-while body into all branches there. We are almost done with the massage... Signed-off-by: Al Viro --- fs/namei.c | 19 +-- 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/fs/namei.c

[PATCH 62/79] link_path_walk: end of nd->depth massage

2015-05-04 Thread Al Viro
From: Al Viro get rid of orig_depth - we only use it on error exit to tell whether to stop doing put_link() when depth reaches 0 (call from path_init()) or when it reaches 1 (call from trailing_symlink()). However, in the latter case the caller would immediately follow with one more put_link().

[PATCH 54/79] link_path_walk: nd->depth massage, part 3

2015-05-04 Thread Al Viro
From: Al Viro remove decrement/increment surrounding nd_alloc_stack(), adjust the test in it. Signed-off-by: Al Viro --- fs/namei.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/fs/namei.c b/fs/namei.c index d8ad004..0d1fcaf 100644 --- a/fs/namei.c +++ b/fs/namei.c @@

[PATCH 58/79] trailing_symlink: nd->depth massage, part 7

2015-05-04 Thread Al Viro
From: Al Viro move decrement of nd->depth on successful returns into the callers. Signed-off-by: Al Viro --- fs/namei.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/namei.c b/fs/namei.c index f81a029..b7b1c2b 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -2001,1

[PATCH 60/79] link_path_walk: nd->depth massage, part 9

2015-05-04 Thread Al Viro
From: Al Viro Make link_path_walk() work with any value of nd->depth on entry - memorize it and use it in tests instead of comparing with 1. Don't bother with increment/decrement in path_init(). Signed-off-by: Al Viro --- fs/namei.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions

[PATCH 61/79] link_path_walk: nd->depth massage, part 10

2015-05-04 Thread Al Viro
From: Al Viro Get rid of orig_depth checks in OK: logics. If nd->depth is zero, we had been called from path_init() and we are done. If it is greater than 1, we are not done, whether we'd been called from path_init() or trailing_symlink(). And in case when it's 1, we might have been called from

[PATCH 65/79] lift terminate_walk() into callers of walk_component()

2015-05-04 Thread Al Viro
From: Al Viro Signed-off-by: Al Viro --- fs/namei.c | 25 +++-- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/fs/namei.c b/fs/namei.c index e53f146..76bf620 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -1579,20 +1579,16 @@ static int walk_component(struct na

[PATCH 64/79] namei: lift (open-coded) terminate_walk() in follow_dotdot_rcu() into callers

2015-05-04 Thread Al Viro
From: Al Viro follow_dotdot_rcu() does an equivalent of terminate_walk() on failure; shifting it into callers makes for simpler rules and those callers already have terminate_walk() on other failure exits. Signed-off-by: Al Viro --- fs/namei.c | 19 ++- 1 file changed, 10 inser

[PATCH 63/79] namei: we never need more than MAXSYMLINKS entries in nd->stack

2015-05-04 Thread Al Viro
From: Al Viro The only reason why we needed one more was that purely nested MAXSYMLINKS symlinks could lead to path_init() using that many entries in addition to nd->stack[0] which it left unused. That can't happen now - path_init() starts with entry 0 (and trailing_symlink() is called only when

[PATCH 67/79] namei: take put_link() into {lookup,mountpoint,do}_last()

2015-05-04 Thread Al Viro
From: Al Viro rationale: we'll need to have terminate_walk() do put_link() on everything, which will mean that in some cases ..._last() will do put_link() anyway. Easier to have them do it in all cases. Signed-off-by: Al Viro --- fs/namei.c | 34 +- 1 file chan

[PATCH 68/79] namei: have terminate_walk() do put_link() on everything left

2015-05-04 Thread Al Viro
From: Al Viro All callers of terminate_walk() are followed by more or less open-coded eqiuvalent of "do put_link() on everything left in nd->stack". Better done in terminate_walk() itself, and when we go for RCU symlink traversal we'll have to do it there anyway. Signed-off-by: Al Viro --- fs

[PATCH 73/79] lustre: rip the private symlink nesting limit out

2015-05-04 Thread Al Viro
From: Al Viro Signed-off-by: Al Viro --- drivers/staging/lustre/lustre/llite/symlink.c | 15 +++ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/drivers/staging/lustre/lustre/llite/symlink.c b/drivers/staging/lustre/lustre/llite/symlink.c index e488cb3..da6d9d1 10064

[PATCH 69/79] link_path_walk: move the OK: inside the loop

2015-05-04 Thread Al Viro
From: Al Viro fewer labels that way; in particular, resuming after the end of nested symlink is straight-line. Signed-off-by: Al Viro --- fs/namei.c | 30 +++--- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/fs/namei.c b/fs/namei.c index 3faf3e2..49ed4

[PATCH 70/79] namei: new calling conventions for walk_component()

2015-05-04 Thread Al Viro
From: Al Viro instead of a single flag (!= 0 => we want to follow symlinks) pass two bits - WALK_GET (want to follow symlinks) and WALK_PUT (put_link() once we are done looking at the name). The latter matters only for success exits - on failure the caller will discard everything anyway. Sugges

[PATCH 66/79] namei: lift (open-coded) terminate_walk() into callers of get_link()

2015-05-04 Thread Al Viro
From: Al Viro Signed-off-by: Al Viro --- fs/namei.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/fs/namei.c b/fs/namei.c index 76bf620..f7bce07 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -892,7 +892,6 @@ const char *get_link(struct nameidata *nd)

[PATCH 71/79] namei: make should_follow_link() store the link in nd->link

2015-05-04 Thread Al Viro
From: Al Viro ... if it decides to follow, that is. Signed-off-by: Al Viro --- fs/namei.c | 63 +- 1 file changed, 34 insertions(+), 29 deletions(-) diff --git a/fs/namei.c b/fs/namei.c index 5eb8b0c..026d7df 100644 --- a/fs/namei.c

[PATCH 77/79] namei: move unlazying on symlinks towards get_link() call sites

2015-05-04 Thread Al Viro
From: Al Viro Signed-off-by: Al Viro --- fs/namei.c | 45 + 1 file changed, 33 insertions(+), 12 deletions(-) diff --git a/fs/namei.c b/fs/namei.c index 98e932c..eb3f7d9 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -538,10 +538,18 @@ static void resto

[PATCH 75/79] namei: simplify the callers of follow_managed()

2015-05-04 Thread Al Viro
From: Al Viro now that it gets nameidata, no reason to have setting LOOKUP_JUMPED on mountpoint crossing and calling path_put_conditional() on failures done in every caller. Signed-off-by: Al Viro --- fs/namei.c | 32 ++-- 1 file changed, 10 insertions(+), 22 deleti

[PATCH 74/79] VFS: replace {, total_}link_count in task_struct with pointer to nameidata

2015-05-04 Thread Al Viro
From: NeilBrown task_struct currently contains two ad-hoc members for use by the VFS: link_count and total_link_count. These are only interesting to fs/namei.c, so exposing them explicitly is poor layering. Incidentally, link_count isn't used anymore, so it can just die. This patches replaces

[PATCH 76/79] don't pass nameidata to ->follow_link()

2015-05-04 Thread Al Viro
From: Al Viro its only use is getting passed to nd_jump_link(), which can obtain it from current->nameidata Signed-off-by: Al Viro --- Documentation/filesystems/Locking | 2 +- Documentation/filesystems/vfs.txt | 2 +- drivers/staging/lustre/lustre/llite/symlink.c |

[PATCH 79/79] namei: stretch RCU mode into get_link()

2015-05-04 Thread Al Viro
From: Al Viro one potentially subtle point: may_follow_link() kludge rejecting symlink traversal in RCU mode is handled by returning -ECHILD and repeating everything in non-RCU mode. Reason: audit_log_link_denied() won't work in RCU mode. Signed-off-by: Al Viro --- fs/namei.c | 86 +++

[PATCH 78/79] namei: new helper - is_stale()

2015-05-04 Thread Al Viro
From: Al Viro we have a lot of places where we open-code the check that dentry->d_seq matches nameidata... Signed-off-by: Al Viro --- fs/namei.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/fs/namei.c b/fs/namei.c index eb3f7d9..cf8f2de 100644 --- a/fs/n

[PATCH 19/79] ceph: switch to simple_follow_link()

2015-05-04 Thread Al Viro
From: Al Viro Signed-off-by: Al Viro --- fs/ceph/inode.c | 11 ++- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c index e876e19..571acd8 100644 --- a/fs/ceph/inode.c +++ b/fs/ceph/inode.c @@ -6,7 +6,6 @@ #include #include #include -

Re: [PATCH v2] adm8211: fix checkpatch error for trailing statements on next line

2015-05-04 Thread Kalle Valo
Okash Khawaja writes: > On Mon, May 04, 2015 at 03:42:04PM +0300, Kalle Valo wrote: >> Okash Khawaja writes: >> >> > This patch fixes the checkpatch.pl error: >> > >> > ERROR: trailing statements should be on next line >> > >> > More specifically, the fix has been applied to the four occurances

[PATCH 10/79] jffs2: switch to simple_follow_link()

2015-05-04 Thread Al Viro
From: Al Viro Signed-off-by: Al Viro --- fs/jffs2/dir.c | 1 + fs/jffs2/fs.c | 1 + fs/jffs2/symlink.c | 45 + 3 files changed, 3 insertions(+), 44 deletions(-) diff --git a/fs/jffs2/dir.c b/fs/jffs2/dir.c index 1ba5c97..8118002 100644 ---

[PATCH 17/79] freevxfs: switch to simple_follow_link()

2015-05-04 Thread Al Viro
From: Al Viro Signed-off-by: Al Viro --- fs/freevxfs/vxfs_extern.h | 3 --- fs/freevxfs/vxfs_immed.c | 34 -- fs/freevxfs/vxfs_inode.c | 7 +-- 3 files changed, 5 insertions(+), 39 deletions(-) diff --git a/fs/freevxfs/vxfs_extern.h b/fs/freevxfs/vxfs_ex

[PATCH 18/79] exofs: switch to {simple,page}_symlink_inode_operations

2015-05-04 Thread Al Viro
From: Al Viro Signed-off-by: Al Viro --- fs/exofs/Kbuild| 2 +- fs/exofs/exofs.h | 4 fs/exofs/inode.c | 9 + fs/exofs/namei.c | 5 +++-- fs/exofs/symlink.c | 55 -- 5 files changed, 9 insertions(+), 66 deletions(-)

[PATCH 02/79] 9p: don't bother with __getname() in ->follow_link()

2015-05-04 Thread Al Viro
From: Al Viro We copy there a kmalloc'ed string and proceed to kfree that string immediately after that. Easier to just feed that string to nd_set_link() and _not_ kfree it until ->put_link() (which becomes kfree_put_link() in that case). Signed-off-by: Al Viro --- fs/9p/v9fs.h | 2

[PATCH 15/79] sysv: switch to simple_follow_link()

2015-05-04 Thread Al Viro
From: Al Viro Signed-off-by: Al Viro --- fs/sysv/Makefile | 2 +- fs/sysv/inode.c | 5 +++-- fs/sysv/symlink.c | 20 fs/sysv/sysv.h| 1 - 4 files changed, 4 insertions(+), 24 deletions(-) delete mode 100644 fs/sysv/symlink.c diff --git a/fs/sysv/Makefile b/fs/sy

[PATCH 11/79] shmem: switch to simple_follow_link()

2015-05-04 Thread Al Viro
From: Al Viro Signed-off-by: Al Viro --- mm/shmem.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/mm/shmem.c b/mm/shmem.c index de98137..7f6e2f8 100644 --- a/mm/shmem.c +++ b/mm/shmem.c @@ -2451,6 +2451,7 @@ static int shmem_symlink(struct inode *dir, struct dentr

[PATCH 51/79] namei: remove restrictions on nesting depth

2015-05-04 Thread Al Viro
From: Al Viro The only restriction is that on the total amount of symlinks crossed; how they are nested does not matter Signed-off-by: Al Viro --- fs/namei.c| 66 --- include/linux/namei.h | 2 ++ 2 files changed, 54 insertions(+), 1

[PATCH 50/79] namei: trim the arguments of get_link()

2015-05-04 Thread Al Viro
From: Al Viro same story as the previous commit --- fs/namei.c | 45 + 1 file changed, 21 insertions(+), 24 deletions(-) diff --git a/fs/namei.c b/fs/namei.c index f0066785..8fd8ccb 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -843,27 +843,33 @@ static

[PATCH 56/79] trailing_symlink: nd->depth massage, part 5

2015-05-04 Thread Al Viro
From: Al Viro move increment of ->depth to the point where we'd discovered that get_link() has not returned an error, adjust exits accordingly. Signed-off-by: Al Viro --- fs/namei.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/fs/namei.c b/fs/namei.c ind

[PATCH 42/79] link_path_walk: get rid of duplication

2015-05-04 Thread Al Viro
From: Al Viro What we do after the second walk_component() + put_link() + depth decrement in there is exactly equivalent to what's done right after the first walk_component(). Easy to verify and not at all surprising, seeing that there we have just walked the last component of nested symlink. S

[PATCH 36/79] namei: move the calls of may_follow_link() into follow_link()

2015-05-04 Thread Al Viro
From: Al Viro All remaining callers of the former are preceded by the latter Signed-off-by: Al Viro --- fs/namei.c | 21 ++--- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/fs/namei.c b/fs/namei.c index 2243d18..a13e47d 100644 --- a/fs/namei.c +++ b/fs/namei.c

[PATCH 23/79] namei: take O_NOFOLLOW treatment into do_last()

2015-05-04 Thread Al Viro
From: Al Viro Signed-off-by: Al Viro --- fs/namei.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/fs/namei.c b/fs/namei.c index 955dc7f..308f325 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -3052,6 +3052,11 @@ finish_lookup: }

[PATCH 52/79] link_path_walk: nd->depth massage, part 1

2015-05-04 Thread Al Viro
From: Al Viro nd->stack[0] is unused until the handling of trailing symlinks and we want to get rid of that. Having fucked that transformation up several times, I went for bloody pedantic series of provably equivalent transformations. Sorry. Step 1: keep nd->depth higher by one in link_path_wa

[PATCH 22/79] uninline walk_component()

2015-05-04 Thread Al Viro
From: Al Viro seriously improves the stack *and* I-cache footprint... Signed-off-by: Al Viro --- fs/namei.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/namei.c b/fs/namei.c index cd0ffc9f18..955dc7f 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -1561,8 +1561,7 @@ sta

[PATCH 31/79] namei: don't bother with ->follow_link() if ->i_link is set

2015-05-04 Thread Al Viro
From: Al Viro with new calling conventions it's trivial Signed-off-by: Al Viro Conflicts: fs/namei.c --- fs/namei.c | 20 +--- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/fs/namei.c b/fs/namei.c index 5f2c986..dbcbe42 100644 --- a/fs/namei.c +++ b/fs

[PATCH 27/79] name: shift nameidata down into user_path_walk()

2015-05-04 Thread Al Viro
From: Al Viro that avoids having nameidata on stack during the calls of ->rmdir()/->unlink() and *two* of those during the calls of ->rename(). Signed-off-by: Al Viro --- fs/namei.c | 124 + 1 file changed, 67 insertions(+), 57 deleti

[PATCH 29/79] new ->follow_link() and ->put_link() calling conventions

2015-05-04 Thread Al Viro
From: Al Viro a) instead of storing the symlink body (via nd_set_link()) and returning an opaque pointer later passed to ->put_link(), ->follow_link() _stores_ that opaque pointer (into void * passed by address by caller) and returns the symlink body. Returning ERR_PTR() on error, NULL on jump (

[PATCH 33/79] do_last: move path there from caller's stack frame

2015-05-04 Thread Al Viro
From: Al Viro We used to need it to feed to follow_link(). No more... Signed-off-by: Al Viro --- fs/namei.c | 50 +- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/fs/namei.c b/fs/namei.c index 72a6130..c5d5e9e 100644 --- a/fs/n

[PATCH 07/79] befs: switch to simple_follow_link()

2015-05-04 Thread Al Viro
From: Al Viro Signed-off-by: Al Viro --- fs/befs/linuxvfs.c | 24 +--- 1 file changed, 5 insertions(+), 19 deletions(-) diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c index 7943533..172e306 100644 --- a/fs/befs/linuxvfs.c +++ b/fs/befs/linuxvfs.c @@ -43,7 +43,6 @@ sta

[PATCH 34/79] namei: expand nested_symlink() in its only caller

2015-05-04 Thread Al Viro
From: Al Viro Signed-off-by: Al Viro --- fs/namei.c | 61 +++-- 1 file changed, 23 insertions(+), 38 deletions(-) diff --git a/fs/namei.c b/fs/namei.c index c5d5e9e..fae70a4 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -1605,43 +1605,6 @@

[PATCH 55/79] link_path_walk: nd->depth massage, part 4

2015-05-04 Thread Al Viro
From: Al Viro lift increment/decrement into link_path_walk() callers. Signed-off-by: Al Viro --- fs/namei.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/fs/namei.c b/fs/namei.c index 0d1fcaf..800cf7e 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -1755,7 +1755,6

[PATCH 43/79] link_path_walk: final preparations to killing recursion

2015-05-04 Thread Al Viro
From: Al Viro reduce the number of returns in there - turn all places where it returns zero into goto OK and places where it returns non-zero into goto Err. The only non-trivial detail is that all breaks in the loop are guaranteed to be with non-zero err. Signed-off-by: Al Viro --- fs/namei.c

[PATCH 38/79] link_path_walk: handle get_link() returning ERR_PTR() immediately

2015-05-04 Thread Al Viro
From: Al Viro If we get ERR_PTR() from get_link(), we are guaranteed to get err != 0 when we break out of do-while, so we are going to hit if (err) return err; shortly after it. Pull that into the if (IS_ERR(s)) body. Signed-off-by: Al Viro --- fs/namei.c | 4 +++- 1 file changed, 3 insertion

[PATCH 40/79] link_path_walk: turn inner loop into explicit goto

2015-05-04 Thread Al Viro
From: Al Viro Signed-off-by: Al Viro --- fs/namei.c | 61 - 1 file changed, 32 insertions(+), 29 deletions(-) diff --git a/fs/namei.c b/fs/namei.c index d6235ea..d46df22 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -1767,6 +1767,10 @@

[PATCH 47/79] namei: move link/cookie pairs into nameidata

2015-05-04 Thread Al Viro
From: Al Viro Array of MAX_NESTED_LINKS + 1 elements put into nameidata; what used to be a local array in link_path_walk() occupies entries 1 .. MAX_NESTED_LINKS in it, link and cookie from the trailing symlink handling loops - entry 0. This is _not_ the final arrangement; just an easily verifie

  1   2   3   4   5   6   7   8   9   10   >