Re: [PATCH] bugfix: two read_inode() calls without clear_inode() call between

2005-08-05 Thread Vasily Averin
Hello, Could you please explain me, why we need to wake up somebody right before freeing an inode? It seems for me, if somebody really wait on this inode, then they have a good chance to access already freed memory. Thank you, Vasily Averin diff --git a/fs/inode.c b/fs/inode.c

irq0 stops working

2007-10-08 Thread Vasily Averin
r now I have no ideas how to continue the investigation of this problem. Could please anybody advise me any new ways for investigation of this issue? Thank you, Vasily Averin OpenVZ Linux Kernel Team - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the bo

Re: irq0 stops working

2007-10-08 Thread Vasily Averin
Jan Engelhardt wrote: > On Oct 9 2007 09:26, Vasily Averin wrote: >> On one of our servers timer interrupts (i.e irq0) are stops working. As >> result >> any kernel timers do not triggers and tasks waiting some signals from timers >> hangs forever. > > What

Re: [PATCH] Prevent NMI oopser

2005-02-02 Thread Vasily Averin
Marcelo Tosatti wrote: On Tue, Jan 25, 2005 at 11:00:22AM +0300, Vasily Averin wrote: You should unlock io_request_lock before msleep, like in latest versions of megaraid2 drivers. Andrey, Can you please update your patch to unlock io_request_lock before sleeping and locking after coming back

Re: [PATCH] Prevent NMI oopser

2005-02-02 Thread Vasily Averin
Hello Matt Matt Domsch wrote: On Wed, Feb 02, 2005 at 09:42:02PM +0300, Vasily Averin wrote: Marcelo, This is megaraid2 driver update (2.10.8.2 version, latest 2.4-compatible version that I've seen), taken from latest RHEL3 kernel update. I believe it should prevent NMI in abort/reset ha

Re: [PATCH] Prevent NMI oopser

2005-02-02 Thread Vasily Averin
Hello Matt Matt Domsch wrote: On Wed, Feb 02, 2005 at 09:42:02PM +0300, Vasily Averin wrote: This is megaraid2 driver update (2.10.8.2 version, latest 2.4-compatible version that I've seen), taken from latest RHEL3 kernel update. I believe it should prevent NMI in abort/reset handler. T

Re: [PATCH] Prevent NMI oopser

2005-02-02 Thread Vasily Averin
Matt Domsch wrote: On Wed, Feb 02, 2005 at 09:42:02PM +0300, Vasily Averin wrote: This is megaraid2 driver update (2.10.8.2 version, latest 2.4-compatible version that I've seen), taken from latest RHEL3 kernel update. I believe it should prevent NMI in abort/reset handler. Thanks Vasily,

[PATCH] Prevent NMI oopser

2005-01-24 Thread Vasily Averin
taken. You should unlock io_request_lock before msleep, like in latest versions of megaraid2 drivers. Please fix it. Thank you, Vasily Averin, SWSoft Linux Kernel Team # ChangeSet # 2005/01/19 14:16:32-02:00 [EMAIL PROTECTED] # [PATCH] Prevent NMI oopser from triggering when megaraid2

i2o: debug messages corrected

2007-10-28 Thread Vasily Averin
max_phys_segments and max_sectors were swapped Signed-off-by: Vasily Averin <[EMAIL PROTECTED]> --- a/drivers/message/i2o/i2o_block.c +++ b/drivers/message/i2o/i2o_block.c @@ -1076,8 +1076,8 @@ static int i2o_block_probe(struct device *dev) blk_queue_max_sectors(queue, max_s

dm: bounce_pfn limit added

2007-10-28 Thread Vasily Averin
direct IO requests are addressed to dm-over-i2o device. Signed-off-by: Vasily Averin <[EMAIL PROTECTED]> --- a/drivers/md/dm-table.c +++ b/drivers/md/dm-table.c @@ -102,6 +102,8 @@ static void combine_restrictions_low(struct io_restrictions lhs->seg_boundary_mask = min

dm: struct io_restriction reordered

2007-10-28 Thread Vasily Averin
it saves some bytes memory Signed-off-by: Vasily Averin <[EMAIL PROTECTED]> --- a/include/linux/device-mapper.h +++ b/include/linux/device-mapper.h @@ -110,12 +110,12 @@ struct target_type { }; struct io_restrictions { + unsigned long seg_boundary_mask; unsign

i2o: CONFIG_DEBUG_SG compilation fixed

2007-10-28 Thread Vasily Averin
i2o crashed when CONFIG_DEBUG_SG is enabled because i2o_block_request structure includes array of scatterlists that should be initialised Signed-off-by: Vasily Averin <[EMAIL PROTECTED]> --- a/drivers/message/i2o/i2o_block.c +++ b/drivers/message/i2o/i2o_block.c @@ -1137,6 +1137,18 @@

Re: [dm-devel] Re: dm: bounce_pfn limit added

2007-10-30 Thread Vasily Averin
max_hw_segments limit. Unfortunately there is not any checks and when i2o driver handles this incorrect request it fills the memory out of i2o_iop0_msg_inpool slab. Thank you, Vasily Averin - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the bod

[2.6.22] negative time jump

2007-07-29 Thread Vasily Averin
.800 s 0 total events [EMAIL PROTECTED] ~]# echo q > /proc/sysrq-trigger Jul 30 06:25:47 ts28 now at 25322820465391 nsecs Full serial console logs are attached, The other hardware details can be found in http://bugzilla.kernel.org/show_bug.cgi?id=8650 Thank you, Vasily Averin Jul 27 13:58:10 ts

Re: [2.6.22] negative time jump

2007-07-30 Thread Vasily Averin
Groundhog Day? Vasily Averin wrote: > [EMAIL PROTECTED] ~]# echo 1 > /proc/timer_stats > [EMAIL PROTECTED] ~]# cat /proc/timer_stats > Timer Stats Version: v0.1 > Sample period: 17.992 s > 0 total events > [EMAIL PROTECTED] ~]# cat /proc/timer_stats > Timer Stats Versi

Re: [2.6.22] negative time jump

2007-07-30 Thread Vasily Averin
john stultz wrote: > On 7/29/07, Vasily Averin <[EMAIL PROTECTED]> wrote: >> I've investigated why my testnode freezes. When I found that node is freezed >> again I've started to press Sysrq keys and noticed the following negative >> time jump. >> >&g

broken timer on VIA K8T800 chipset?

2007-08-02 Thread Vasily Averin
Vasily Averin wrote: > john stultz wrote: >> On 7/29/07, Vasily Averin <[EMAIL PROTECTED]> wrote: >>> I've investigated why my testnode freezes. When I found that node is freezed >>> again I've started to press Sysrq keys and noticed the following negativ

How Inactive may be much greather than cached?

2007-10-17 Thread Vasily Averin
it become "invalid" instead be freed? Who holds the references to these pages? thank you, Vasily Averin - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.or

Re: How Inactive may be much greather than cached?

2007-10-18 Thread Vasily Averin
Nick Piggin wrote: > Hi, > > On Thursday 18 October 2007 16:24, Vasily Averin wrote: >> Hi all, >> >> could anybody explain how "inactive" may be much greater than "cached"? >> stress test (http://weather.ou.edu/~apw/projects/stress/) that w

Re: How Inactive may be much greather than cached?

2007-10-18 Thread Vasily Averin
Nick Piggin wrote: > Some filesystems, including I believe, ext3 with data=ordered, > can leave orphaned pages around after they have been truncated > out of the pagecache. These pages get left on the LRU and vmscan > reclaims them pretty easily. > > Try ext3 data=writeback, or even ext2. thanks,

Re: irq0 stops working

2007-11-05 Thread Vasily Averin
Thomas Gleixner wrote: > On Tue, 9 Oct 2007, Vasily Averin wrote: >> On one of our servers timer interrupts (i.e irq0) are stops working. As >> result >> any kernel timers do not triggers and tasks waiting some signals from timers >> hangs forever. >> >> Als

Re: [Q] PCI Express and ide (native) leads to irq storm?

2006-11-16 Thread Vasily Averin
Tejun Heo wrote: > Vasily Averin wrote: >> Alan Cox wrote: >>> Ar Gwe, 2006-10-27 am 17:17 +0400, ysgrifennodd Vasily Averin: >>>> Could somebody please help me to troubleshoot this issue? I've seen this >>>> issue >>>> on the custo

Re: [Q] workaround for ide (native) leads to irq storm?

2006-11-17 Thread Vasily Averin
Vasily Averin wrote: > Tejun Heo wrote: >> Vasily Averin wrote: >>> I've reproduced this issue on linux 2.6.19-rc5 kernel. >>> >>> Please see http://bugzilla.kernel.org/show_bug.cgi?id=7518 for details >> >> Fortunately, libata is immune to the

[PATCH ext3/ext4] lost brelse in ext3_read_inode

2007-06-02 Thread Vasily Averin
From: Kirill Korotaev <[EMAIL PROTECTED]> One of error path in ext3_read_inode() leaks bh since brelse is forgoten. Signed-Off-By: Kirill Korotaev <[EMAIL PROTECTED]> Acked-by: Vasily Averin <[EMAIL PROTECTED]> diff --git a/fs/ext3/inode.c b/fs/ext3/inode.c inde

[patch i2o] i2o layer cleanup

2007-05-15 Thread Vasily Averin
h i2o 5/6] i2o_proc files permission [patch i2o 6/6] i2o debug output cleanup However because of Markus Lidel is not i2o maintainer now, I do not understand who should agree the following patches. Thank you, Vasily Averin - To unsubscribe from this list: send the line "unsubscribe li

[patch i2o 1/6] i2o_cfg_passthru cleanup

2007-05-15 Thread Vasily Averin
torig controllers state, and in case of memory shortage it leads to the node crash or disk IO stall. Signed-off-by: Vasily Averin <[EMAIL PROTECTED]> --- lk2.6/drivers/message/i2o/i2o_config.c +++ lk2.6/drivers/message/i2o/i2o_config.c @@ -554,8 +554,6 @@ static int i2o_cfg_passthru32

[patch i2o 2/6] wrong memory access in i2o_block_device_lock()

2007-05-15 Thread Vasily Averin
This patch fixes access to memory that has not been allocated: i2o_msg_get_wait() can returns errors different from I2O_QUEUE_EMPTY. But the result is checked only against this code. If it is not I2O_QUEUE_EMPTY then we dereference the error code as the pointer later. Signed-off-by: Vasily Averin

[patch i2o 3/6] i2o message leak in i2o_msg_post_wait_mem()

2007-05-15 Thread Vasily Averin
We need to free i2o msg in case of error. Signed-off-by: Vasily Averin <[EMAIL PROTECTED]> --- lk2.6/drivers/message/i2o/exec-osm.c +++ lk2.6/drivers/message/i2o/exec-osm.c @@ -131,8 +131,10 @@ int i2o_msg_post_wait_mem(struct i2o_con int rc = 0; wait = i2o_exec_wait

[patch i2o 4/6] i2o proc reading oops

2007-05-15 Thread Vasily Averin
fixed oops on reading from some i2o proc files (i2o_seq_show_driver_store() and other) because their handlers uses "exec" field in struct i2o_controller Signed-off-by: Vasily Averin <[EMAIL PROTECTED]> --- lk2.6/drivers/message/i2o/exec-osm.c +++ lk2.6/drivers/message/i2o/exec

[patch i2o 5/6] i2o_proc files permission

2007-05-15 Thread Vasily Averin
Reading from some i2o related proc files can lead to the i2o controller hang due unknown reasons. As a workaround this patch changes the permission of these files to root-only accessible. Signed-off-by: Vasily Averin <[EMAIL PROTECTED]> --- lk2.6/drivers/message/i2o/i2o_proc.c +++ lk2.6/d

[patch i2o 6/6] i2o debug output cleanup

2007-05-15 Thread Vasily Averin
fixed output of i2o debug messages, extra KERN_ are removed Signed-off-by: Vasily Averin <[EMAIL PROTECTED]> --- lk2.6/drivers/message/i2o/debug.c +++ lk2.6/drivers/message/i2o/debug.c @@ -24,7 +24,7 @@ void i2o_report_status(const char *sever if (cmd == I2O_CMD_UTIL_EVT_RE

Re: [Devel] [patch i2o 5/6] i2o_proc files permission

2007-05-15 Thread Vasily Averin
y send a I2O command to the controller, but this one couldn't handle it and instead of just aborting the command "panic's". IIRC it's only Adaptec related, the Promise controllers doesn't show this behaviour. Thank you, Vasily Averin Vasily Averin wrote: >

Re: [patch i2o 5/6] i2o_proc files permission

2007-05-15 Thread Vasily Averin
Alan Cox wrote: > On Tue, 15 May 2007 16:47:05 +0400 > Vasily Averin <[EMAIL PROTECTED]> wrote: > >> Reading from some i2o related proc files can lead to the i2o controller hang >> due >> unknown reasons. As a workaround this patch changes the permission of these

[PATCH ext3/ext4] orphan list check on destroy_inode

2007-06-03 Thread Vasily Averin
Customers claims to ext3-related errors, investigation showed that ext3 orphan list has been corrupted and have the reference to non-ext3 inode. The following debug helps to understand the reasons of this issue. Signed-off-by: Vasily Averin <[EMAIL PROTECTED]> diff --git a/fs/ext3/sup

[RFC PATCH ext3/ext4] orphan list corruption due bad inode

2007-06-03 Thread Vasily Averin
rrectly. As far as i see is_bad_inode() is called after iget() in all places excluding ext3_lookup() and ext3_get_parent(). I believe it makes sense to add bad inode check to these functions too and call iput if bad inode detected. Signed-off-by: Vasily Averin <[EMAIL PROTECTED]> diff --

Re: [RFC PATCH ext3/ext4] orphan list corruption due bad inode

2007-06-04 Thread Vasily Averin
Andrew Morton wrote: > On Mon, 04 Jun 2007 09:19:10 +0400 Vasily Averin <[EMAIL PROTECTED]> wrote: >> diff --git a/fs/ext3/namei.c b/fs/ext3/namei.c >> index 9bb046d..e3ac8c3 100644 >> --- a/fs/ext3/namei.c >> +++ b/fs/ext3/namei.c >> @@ -1019,6 +1019,11 @@ s

Re: [PATCH ext3/ext4] orphan list check on destroy_inode

2007-06-04 Thread Vasily Averin
Eric Sandeen wrote: > Vasily Averin wrote: >> Customers claims to ext3-related errors, investigation showed that ext3 >> orphan list has been corrupted and have the reference to non-ext3 inode. >> The following debug helps to understand the reasons of this issue. > >

Re: [RFC PATCH ext3/ext4] orphan list corruption due bad inode

2007-06-04 Thread Vasily Averin
Eric Sandeen wrote: > Vasily Averin wrote: >> Bad inode can live some time, ext3_unlink can add it to orphan list, but >> ext3_delete_inode() do not deleted this inode from orphan list. As result >> we can have orphan list corruption detected in ext3_destroy_inode(). > &

Re: [RFC PATCH ext3/ext4] orphan list corruption due bad inode

2007-06-05 Thread Vasily Averin
Christoph Hellwig wrote: > On Tue, Jun 05, 2007 at 10:11:12AM +0400, Vasily Averin wrote: >>>>return d_splice_alias(inode, dentry); >>>> } >>> Seems reasonable. So this prevents the bad inodes from getting onto the >>> orphan list in the fi

[PATCH] [RESEND] ext[34] orphan list check on destroy_inode

2007-06-05 Thread Vasily Averin
Customers claims to ext3-related errors, investigation showed that ext3 orphan list has been corrupted and have the reference to non-ext3 inode. The following debug helps to understand the reasons of this issue. Signed-off-by: Vasily Averin <[EMAIL PROTECTED]> diff --git a/fs/ext3/super.

Re: [NETFILTER] early_drop() imrovement (v3)

2007-06-26 Thread Vasily Averin
our on various nodes. However I doubt strongly that anybody will want to change this value. Do you think it is really required? thank you, Vasily Averin - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More

[NETFILTER] early_drop() imrovement (v4)

2007-06-27 Thread Vasily Averin
hash buckets. As result in any case the search will have the same chances to free one of the conntracks and the check will not lead to long delays. Signed-off-by: Vasily Averin <[EMAIL PROTECTED]> diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c index 7

Re: [NETFILTER] early_drop() imrovement (v4)

2007-06-27 Thread Vasily Averin
it is incorrect, We should count the number of checked _conntracks_, but you count the number of hash buckets. I.e "i" should be incremented/checked inside the nested loop. Thank you, Vasily Averin - To unsubscribe from this list: send the line "unsubscribe linux-kernel"

Re: [NETFILTER] early_drop() imrovement (v4)

2007-06-27 Thread Vasily Averin
Patrick McHardy wrote: > Vasily Averin wrote: >> it is incorrect, >> We should count the number of checked _conntracks_, but you count the number >> of >> hash buckets. I.e "i" should be incremented/checked inside the nested loop. > > > I misunderst

Re: [NETFILTER] early_drop() imrovement (v4)

2007-06-27 Thread Vasily Averin
Patrick McHardy wrote: > Vasily Averin wrote: >> Patrick McHardy wrote: > -static int early_drop(struct hlist_head *chain) > +static int early_drop(unsigned int hash) > { > /* Use oldest entry, which is roughly LRU */ > struct nf_conntrack_tuple_hash *h; &g

[PATCH netdev] "wrong timeout value" in sk_wait_data()

2007-05-23 Thread Vasily Averin
to set negative timeout values (sets 0 instead) and outputs ratelimited information message about such attempts. Signed-Off-By: Vasily Averin <[EMAIL PROTECTED]> diff --git a/net/core/sock.c b/net/core/sock.c index 22183c2..27d7a46 100644 --- a/net/core/sock.c +++ b/net/core/sock.c @@ -206,7

[PATCH netdev] "wrong timeout value" in sk_wait_data() v2

2007-05-23 Thread Vasily Averin
to set negative timeout values (sets 0 instead) and outputs ratelimited information message about such attempts. Signed-Off-By: Vasily Averin <[EMAIL PROTECTED]> diff --git a/net/core/sock.c b/net/core/sock.c index 22183c2..7e51d3a 100644 --- a/net/core/sock.c +++ b/net/core/sock.c @@ -206,7

[patch 2.6.21-rc3] [smbfs] "double free" memory corruption in smbfs

2007-03-14 Thread Vasily Averin
ocated but last smb_rput still tries to free it again. To prevent this issue rq_trans2buffer pointer should be set to NULL after kfree. Signed-off-by: Vasily Averin <[EMAIL PROTECTED]> --- 2.6.21-rc3/fs/smbfs/request.c 2007-03-13 14:22:53.0 +0300 +++ 2.6.21-rc3/fs/smbfs/request

[NETFILTER] early_drop() imrovement (v3)

2007-05-09 Thread Vasily Averin
bucket (NF_CT_PER_BUCKET) and allows to search conntracks in other hash buckets. As result in any case the search will have the same chances to free one of the conntracks and the check will not lead to long delays. Signed-off-by: Vasily Averin <[EMAIL PROTECTED]> diff --git a/net/net

[PATCH 2.6.21-rc5] [I2O] block IO errors on i2o disk

2007-03-26 Thread Vasily Averin
extra debug checks without any drawbacks and restores the normal driver's work. Signed-off-by: Vasily Averin <[EMAIL PROTECTED]> --- 2.6.21-rc5/drivers/message/i2o/i2o_block.c 2007-02-04 21:44:54.0 +0300 +++ 2.6.21-rc5/drivers/message/i2o/i2o_block.c 2007-03-26 11:03:52.

[PATCH 2.6.21-rc6] [netfilter] early_drop imrovement

2007-04-06 Thread Vasily Averin
bucket may be empty but the neighbour ones can have the number of conntracks that can be freed. With the following patch early_drop() will search conntracks in all hash buckets. Signed-off-by: Vasily Averin <[EMAIL PROTECTED]> --- 2.6.21-rc6/net/ipv4/netfilter/ip_conntrack_core.c

[PATCH 2.6.21-rc6] [netfilter] early_drop imrovement

2007-04-06 Thread Vasily Averin
bucket may be empty but the neighbour ones can have the number of conntracks that can be freed. With the following patch early_drop() will search conntracks in all hash buckets. Signed-off-by: Vasily Averin <[EMAIL PROTECTED]> --- 2.6.21-rc6/net/ipv4/netfilter/ip_conntrack_core.c

Re: [PATCH 2.6.21-rc6] [netfilter] early_drop imrovement

2007-04-06 Thread Vasily Averin
Eric Dumazet wrote: > On Fri, 06 Apr 2007 12:00:29 +0400 > Vasily Averin <[EMAIL PROTECTED]> wrote: > >> When the number of conntracks is reached ip_conntrack_max limit, >> early_drop() is >> called and tries to free one of already used conntracks in one of th

[PATCH nf-2.6.22] [netfilter] early_drop imrovement

2007-04-07 Thread Vasily Averin
bucket and allows to search conntracks in other hash buckets. Signed-off-by: Vasily Averin <[EMAIL PROTECTED]> diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c index e132c8a..d0b5794 100644 --- a/net/netfilter/nf_conntrack_core.c +++ b/net/net

Re: [PATCH nf-2.6.22] [netfilter] early_drop imrovement

2007-04-07 Thread Vasily Averin
Eric Dumazet wrote: > Vasily Averin a e'crit : >> When the number of conntracks is reached nf_conntrack_max limit, >> early_drop() is >> called and tries to free one of already used conntracks in one of the >> hash >> buckets. If it does not find any conntr

[PATCH 1/2] NFSD: notifiers registration cleanup

2016-09-21 Thread Vasily Averin
already freed memory. fixes: 36684996 ("nfsd: Register callbacks on the inetaddr_chain and inet6addr_chain") Signed-off-by: Vasily Averin --- fs/nfsd/nfssvc.c | 17 + 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/fs/nfsd/nfssvc.c b/fs/nfsd/nfssvc.c ind

[PATCH 2/2] notifiers: double register detection

2016-09-21 Thread Vasily Averin
WARN_ON should help to detect double register of the same notifiers Signed-off-by: Vasily Averin --- kernel/notifier.c | 1 + 1 file changed, 1 insertion(+) diff --git a/kernel/notifier.c b/kernel/notifier.c index fd2c9ac..e02b2f0 100644 --- a/kernel/notifier.c +++ b/kernel/notifier.c @@ -22,6

Re: [PATCH 1/2] NFSD: notifiers registration cleanup

2016-09-22 Thread Vasily Averin
On 21.09.2016 16:20, Jeff Layton wrote: > Good catch. I'm not very fond of the refcounting this here but it > should > serve the purpose and I don't have anything better to suggest. FWIW, I > think the nfsd_mutex is held during all of these operations so we > probably don't need atomics for the ref

[PATCH] lockd: double unregister of inetaddr notifiers

2017-10-17 Thread Vasily Averin
-by: Vasily Averin --- fs/lockd/svc.c | 20 +--- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/fs/lockd/svc.c b/fs/lockd/svc.c index b995bdc..f04ecfc 100644 --- a/fs/lockd/svc.c +++ b/fs/lockd/svc.c @@ -369,6 +369,7 @@ static int lockd_start_svc(struct svc_serv

[RFC PATCH 0/2] race of lockd/nfsd inetaddr notifiers with pointers change

2017-10-17 Thread Vasily Averin
, waitqueue allows to delay stop of service until notifier is in use. Patches was not tested because I was unable to reproduce the problem on new kernels. Please review it carefully and let me know if this can be fixed in a better way. Vasily Averin (2): race of lockd inetaddr notifiers with

[RFC PATCH 1/2] race of lockd inetaddr notifiers with nlmsvc_rqst change

2017-10-17 Thread Vasily Averin
my patch "lockd: double unregister of inetaddr notifiers" submitted separately. Signed-off-by: Vasily Averin --- fs/lockd/svc.c | 16 ++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/fs/lockd/svc.c b/fs/lockd/svc.c index f04ecfc..c1573860 100644 ---

[RFC PATCH 2/2] race of nfsd inetaddr notifiers with nn->nfsd_serv change

2017-10-17 Thread Vasily Averin
ows notifiers to access to nn->nfsd_serv only when the pointer was correctly initialized and delays its cleanup until notifiers are in use. Signed-off-by: Vasily Averin --- fs/nfsd/netns.h | 3 +++ fs/nfsd/nfsctl.c | 3 +++ fs/nfsd/nfssvc.c | 14 +++--- 3 files changed, 17 insertions

[PATCH] memory leaks triggered by perf --namespace

2017-11-14 Thread Vasily Averin
does not allow to free unused namespace. Fixes: commit e422267322cd ("perf: Add PERF_RECORD_NAMESPACES to include namespaces related info") Signed-off-by: Vasily Averin --- kernel/events/core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/kernel/events/core.c b/kernel/events/co

Re: [PATCH] lost path_put in perf_fill_ns_link_info

2017-11-14 Thread Vasily Averin
On 2017-11-08 16:04, Vasily Averin wrote: > On 2017-11-08 15:09, Alexander Shishkin wrote: >> On Mon, Nov 06, 2017 at 09:22:18AM +0300, Vasily Averin wrote: >>> Fixes: commit e422267322cd ("perf: Add PERF_RECORD_NAMESPACES to include >>> namespaces related info&qu

[PATCH] lost path_put in perf_fill_ns_link_info

2017-11-05 Thread Vasily Averin
Fixes: commit e422267322cd ("perf: Add PERF_RECORD_NAMESPACES to include namespaces related info") Signed-off-by: Vasily Averin --- kernel/events/core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/kernel/events/core.c b/kernel/events/core.c index 10cdb9c..ab5ac84 100644 --

Re: [PATCH] lost path_put in perf_fill_ns_link_info

2017-11-05 Thread Vasily Averin
Dear Hari, I did not found where your patch decreases mnt counter, it seems for me you have lost path_put in perf_fill_ns_link_info(). Thank you, Vasily Averin On 2017-11-06 09:22, Vasily Averin wrote: > Fixes: commit e422267322cd ("perf: Add PERF_RECORD_NAMESPACES to

Re: [RFC PATCH 0/2] race of lockd/nfsd inetaddr notifiers with pointers change

2017-10-19 Thread Vasily Averin
pointer, and then svc_age_temp_xprts_now crash the host on access to already freed memory. Moreover on initialization nlmsvc_rqst can be temporally set to ERR_PTR. NFSD have similar issue. On 2017-10-17 19:40, Vasily Averin wrote: > lockd and nfsd inet[6]addr notifiers use pointer that can be changed

[PATCH] nlm_shutdown_hosts_net() cleanup

2017-10-30 Thread Vasily Averin
nlm_complain_hosts() walk through nlm_server_hosts hlist that should be protected by nlm_host_mutex. Signed-off-by: Vasily Averin --- fs/lockd/host.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/lockd/host.c b/fs/lockd/host.c index d716c99..089c1d7 100644 --- a/fs

[PATCH] lockd: fix lockd shutdown race with signal

2017-10-30 Thread Vasily Averin
nction that is called in all rollback cases and correctly removes lock_manager. The patch still resolves the problem fixed by reverted patch: now final final locks_end_grace() is called not before but after stop of lockd kernel thread. Fixes commit efda760fe95e ("lockd: fix lockd shutdown ra

Re: [RFC PATCH 0/2] race of lockd/nfsd inetaddr notifiers with pointers change

2017-10-30 Thread Vasily Averin
nal" Thank you, Vasily Averin On 2017-10-19 18:42, Vasily Averin wrote: > cc: Scott Mayhew > > Dear Scott, > could you please take look at patches? > > Let me describe the problem once again: > > lockd_inetaddr_event() > ... > if (nlmsvc_rqst)

Re: [PATCH] nlm_shutdown_hosts_net() cleanup

2017-10-30 Thread Vasily Averin
On 2017-10-30 17:49, J. Bruce Fields wrote: > On Mon, Oct 30, 2017 at 04:47:58PM +0300, Vasily Averin wrote: >> nlm_complain_hosts() walk through nlm_server_hosts hlist that should be >> protected by nlm_host_mutex. > > I haven't looked at the NLM locking in ages.

Re: [PATCH 1/2] wait/ptrace: always assume __WALL if the child is traced

2015-10-20 Thread Vasily Averin
On 21.10.2015 01:31, Andrew Morton wrote: > On Tue, 20 Oct 2015 19:17:54 +0200 Oleg Nesterov wrote: > >> The following program (simplified version of generated by syzkaller) >> >> #include >> #include >> #include >> #include >> #include >> >> void *thread_func(v

Re: [PATCH] mm: cleancache: fix corruption on missed inode invalidation

2018-11-15 Thread Vasily Averin
On 11/16/18 1:31 AM, Andrew Morton wrote: > On Mon, 12 Nov 2018 12:57:34 +0300 Pavel Tikhomirov > wrote: > >> If all pages are deleted from the mapping by memory reclaim and also >> moved to the cleancache: >> >> __delete_from_page_cache >> (no shadow case) >> unaccount_page_cache_page >>

[PATCH v3] ext4: missing !bh check in ext4_xattr_inode_write()

2018-11-08 Thread Vasily Averin
file system corruption (although that would be highly unlikely given that we had *just* allocated the blocks and so the metadata blocks in question probably would still be in the cache). Fixes e50e5129f384 ("ext4: xattr-in-inode support") Cc: sta...@kernel.org # 4.13 Signed-off-by

[PATCH] lib/mpi: headers cleanup

2018-06-01 Thread Vasily Averin
itional ...") commit bc95eeadf5c6 ("lib/mpi: removed unused functions") however headers was not updated properly. Also I deleted some unused macros. cc: Dmitry Kasatkin Signed-off-by: Vasily Averin --- include/linux/mpi.h| 61 --

[PATCH 3/7] ext4 resize: missing brelse() in case success in add_new_gdb()

2018-10-29 Thread Vasily Averin
Fixes ac27a0ec112a ("ext4: initial copy of files from ext3") #? cc: stable # 2.6.19 or evel earlier in ext3 Signed-off-by: Vasily Averin --- fs/ext4/resize.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/ext4/resize.c b/fs/ext4/resize.c index 0a4dc6217e78..ff17480e8

[PATCH 0/7] ext4 resize long-lived errors

2018-10-29 Thread Vasily Averin
n body of the cycle to avoid having to call him on rollback. Other patches fixes visually-found mistakes. Vasily Averin (7): ext4 resise: extra brelse in setup_new_flex_group_blocks() ext4 resize: missing brelse() after errors in set_flexbg_block_bitmap() ext4 resize: missing brelse() in c

[PATCH 2/7] ext4 resize: missing brelse() after errors in set_flexbg_block_bitmap()

2018-10-29 Thread Vasily Averin
Fixes 33afdcc5402d ("ext4: add a function which sets up group blocks ...") #? cc: sta...@vger.kernel.org # 3.3+ Signed-off-by: Vasily Averin --- fs/ext4/resize.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/fs/ext4/resize.c b/fs/ext4/resize.c index c3

[PATCH 1/7] ext4 resise: extra brelse in setup_new_flex_group_blocks()

2018-10-29 Thread Vasily Averin
body of cycle to exclude requirement of brelse() call in rollback. Fixes 33afdcc5402d ("ext4: add a function which sets up group blocks ...") #? cc: sta...@vger.kernel.org # 3.3+ Signed-off-by: Vasily Averin --- fs/ext4/resize.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletion

[PATCH 7/7] ext4 resize: lost resize_inode cleanup before retry in ext4_resize_fs()

2018-10-29 Thread Vasily Averin
Fixes 1c6bd7173d66 ("ext4: convert file system to meta_bg if needed ...") #? cc: stable # 3.7+ Signed-off-by: Vasily Averin --- fs/ext4/resize.c | 4 1 file changed, 4 insertions(+) diff --git a/fs/ext4/resize.c b/fs/ext4/resize.c index 16b7cfe485d7..3006ede18773 100644 ---

[PATCH 5/7] ext4 resize: lost brelse() in update_backups()

2018-10-29 Thread Vasily Averin
bh was not released after error in ext4_journal_get_write_access() Fixes ac27a0ec112a ("ext4: initial copy of files from ext3") #? cc: stable # 2.6.19 or even earlier in ext3 Signed-off-by: Vasily Averin --- fs/ext4/resize.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletio

[PATCH 4/7] ext4 resize: brelse() cleanup in add_new_gdb_meta_bg()

2018-10-29 Thread Vasily Averin
7+ Signed-off-by: Vasily Averin --- fs/ext4/resize.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/ext4/resize.c b/fs/ext4/resize.c index ff17480e8613..ff8389ac4769 100644 --- a/fs/ext4/resize.c +++ b/fs/ext4/resize.c @@ -923,6 +923,7 @@ static int add_new_gdb_meta

[PATCH 6/7] ext4 resize: lost rollback in ext4_resize_fs()

2018-10-29 Thread Vasily Averin
Fixes 117fff10d7f1 ("ext4: grow the s_flex_groups array as needed ...") #? cc: stable # 3.7+ Signed-off-by: Vasily Averin --- fs/ext4/resize.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/ext4/resize.c b/fs/ext4/resize.c index 26bcb53e5869..16b7cfe48

Re: [PATCH 3/7] ext4 resize: missing brelse() in case success in add_new_gdb()

2018-10-30 Thread Vasily Averin
please drop this one, it isn't correct. On 10/29/2018 06:25 PM, Vasily Averin wrote: > Fixes ac27a0ec112a ("ext4: initial copy of files from ext3") > #? cc: stable # 2.6.19 or evel earlier in ext3 > > Signed-off-by: Vasily Averin > --- > fs/ext4/re

[PATCH v2 00/11] ext4: number of long lived errors

2018-10-30 Thread Vasily Averin
n body of the cycle to avoid having to call him on rollback. Other patches fixes visually-found mistakes. v2 changes: I've found error in one of v1 patches and fixed it, then I've found 4 additional issues, mostly related to iloc.bh accounting Vasily Averin (11): ext4 resise: extra

[PATCH v2 02/11] ext4 resize: missing brelse() after errors in set_flexbg_block_bitmap()

2018-10-30 Thread Vasily Averin
Fixes 33afdcc5402d ("ext4: add a function which sets up group blocks ...") # 3.3 Signed-off-by: Vasily Averin --- fs/ext4/resize.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/fs/ext4/resize.c b/fs/ext4/resize.c index c3fa30878ca8..0a4dc6217e78 100644 ---

[PATCH v2 01/11] ext4 resise: extra brelse in setup_new_flex_group_blocks()

2018-10-30 Thread Vasily Averin
body of cycle to exclude requirement of brelse() call in rollback. Fixes 33afdcc5402d ("ext4: add a function which sets up group blocks ...") # 3.3+ Signed-off-by: Vasily Averin --- fs/ext4/resize.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/fs/ext4/res

[PATCH v2 05/11] ext4 resize: lost rollback in ext4_resize_fs()

2018-10-30 Thread Vasily Averin
Fixes 117fff10d7f1 ("ext4: grow the s_flex_groups array as needed ...") # 3.7 Signed-off-by: Vasily Averin --- fs/ext4/resize.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/ext4/resize.c b/fs/ext4/resize.c index 3df326ee6d50..5fee65afd58b 100644 --- a/fs/ext

[PATCH v2 04/11] ext4 resize: lost brelse() in update_backups()

2018-10-30 Thread Vasily Averin
bh was not released after error in ext4_journal_get_write_access() Fixes ac27a0ec112a ("ext4: initial copy of files from ext3") # 2.6.19 Signed-off-by: Vasily Averin --- fs/ext4/resize.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fs/ext4/resize.c b/fs/ext

[PATCH v2 06/11] ext4 resize: lost resize_inode cleanup before retry in ext4_resize_fs()

2018-10-30 Thread Vasily Averin
Fixes 1c6bd7173d66 ("ext4: convert file system to meta_bg if needed ...") # 3.7 Signed-off-by: Vasily Averin --- fs/ext4/resize.c | 4 1 file changed, 4 insertions(+) diff --git a/fs/ext4/resize.c b/fs/ext4/resize.c index 5fee65afd58b..85158e9de7c2 100644 --- a/fs/ext4/resize.

[PATCH v2 07/11] ext4: lost put_bh in ext4_mark_iloc_dirty()

2018-10-30 Thread Vasily Averin
ext4_mark_iloc_dirty() callers expect that it releases iloc->bh even if it returns an error. Fixes 0db1ff222d40 ("ext4: add shutdown bit and check for it") # 4.11 Signed-off-by: Vasily Averin --- fs/ext4/inode.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --

[PATCH v2 03/11] ext4 resize: brelse() cleanup in add_new_gdb_meta_bg()

2018-10-30 Thread Vasily Averin
gdb_bh must be released in case of errors before update of s_group_desc but it must not be released after update of group descriptors because in this case bh can be used later. Fixes 01f795f9e0d6 ("ext4: add online resizing support for meta_bg ...") # 3.7 Signed-off-by: Vasily Averi

[PATCH v2 09/11] ext4: iloc.bh cleanup in add_new_gdb()

2018-10-30 Thread Vasily Averin
iloc.bh was taken in ext4_reserve_inode_write() and released in ext4_mark_iloc_dirty(). It should not be released 2nd time in rollback after failed ext4_handle_dirty_metadata(gdb_bh) Fixes b40971426a83 ("ext4: add error checking to calls to ...") # 2.6.38 Signed-off-by: Vasily Averi

[PATCH v2 10/11] ext4: remove useless brelse call in ext4_xattr_inode_update_ref()

2018-10-30 Thread Vasily Averin
brelse(iloc.bh) is useless here, it is always called with iloc.bh = NULL Fixes dec214d00e0d ("ext4: xattr inode deduplication") # 4.13 cc: Tahsin Erdogan Signed-off-by: Vasily Averin --- fs/ext4/xattr.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/fs/ext4

[PATCH v2 11/11] ext4: access to uninitialized bh fields in ext4_xattr_set_handle()

2018-10-30 Thread Vasily Averin
can access uninitialized bh fields of on-stack located "is" and "bs" structures. Issue was inherited from ext3 and was present in first ext4 commit. Fixes ac27a0ec112a ("ext4: initial copy of files from ext3") # 2.6.19 Signed-off-by: Vasily Averin --- fs/ext4/xatt

[PATCH v2 08/11] ext4: lost brelse in ext4_orphan_add()

2018-10-30 Thread Vasily Averin
3617e579e0 ("ext4: Handle non empty on-disk orphan link") #2.6.34 cc: Dmitry Monakhov Signed-off-by: Vasily Averin --- fs/ext4/namei.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c index 67a38532032a..d388cce72db2 100644 --- a/f

Re: [PATCH v2 11/11] ext4: access to uninitialized bh fields in ext4_xattr_set_handle()

2018-10-30 Thread Vasily Averin
hey *are* initialized to zero.  I did not know it, I re-checked it in generated assembler code and found that you are right and I was wrong. Please drop this patch, should I resend of rest of this patch set once again? Thank you, Vasily Averin

[PATCH 1/7] ext4: lost brelse in __ext4_read_dirblock()

2018-10-31 Thread Vasily Averin
Fixes dc6982ff4db1 ("ext4: refactor code to read directory blocks ...") # 3.9 Signed-off-by: Vasily Averin --- fs/ext4/namei.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c index d388cce72db2..1a21e59ede72 100644 --- a/fs/ext4/namei.c +++

[PATCH 0/7] ext4 long-lived issues, part two

2018-10-31 Thread Vasily Averin
I've found one more batch of long-lived ext4 issues, most of them are lost brelse + two leaks on rollback in ext4_fill_super. Oldest one was found in 2.6.23, last one -- in 4.18. Vasily Averin (7): ext4: lost brelse in __ext4_read_dirblock() ext4: possible sbi->s_group_desc

[PATCH 2/7] ext4: possible sbi->s_group_desc leak in ext4_fill_super

2018-10-31 Thread Vasily Averin
Fixes bfe0a5f47ada ("ext4: add more mount time checks of the superblock") # 4.18 Signed-off-by: Vasily Averin --- fs/ext4/super.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/ext4/super.c b/fs/ext4/super.c index a221f1cdf704..ed4d36506ec2 100644 --- a/fs/ex

  1   2   >