[PATCH 2.6.20 06/10] nfnetlink_log: micro-optimization: don't modify destroyed instance

2007-02-12 Thread Michał Mirosław
Simple micro-optimization: Don't change any options if the instance is being destroyed. Signed-off-by: Michał Mirosław [EMAIL PROTECTED] --- linux-2.6.20/net/netfilter/nfnetlink_log.c.42007-02-11 20:46:26.0 +0100 +++ linux-2.6.20/net/netfilter/nfnetlink_log.c 2007-02-11 22:24

[PATCH 2.6.20 10/10] nfnetlink_log: enable packet timestamps

2007-02-12 Thread Michał Mirosław
It's nice to log packet arrival time of those little filthy packets. ;) Signed-off-by: Michał Mirosław [EMAIL PROTECTED] --- linux-2.6.20/net/netfilter/nfnetlink_log.c.82007-02-11 23:59:01.0 +0100 +++ linux-2.6.20/net/netfilter/nfnetlink_log.c 2007-02-12 00:19:16.0

[PATCH 2.6.20 02/10] nfnetlink_log: stop reference leak

2007-02-12 Thread Michał Mirosław
Stop reference leaking in nfulnl_log_packet(). If we start a timer we are already taking another reference. Signed-off-by: Michał Mirosław [EMAIL PROTECTED] --- linux-2.6.20/net/netfilter/nfnetlink_log.c.02007-02-11 20:20:27.0 +0100 +++ linux-2.6.20/net/netfilter/nfnetlink_log.c

[PATCH 2.6.20 05/10] nfnetlink_log: micro-optimization for inst==NULL in nfulnl_recv_config()

2007-02-12 Thread Michał Mirosław
Simple micro-optimization: don't call instance_put() on known NULL pointers. Signed-off-by: Michał Mirosław [EMAIL PROTECTED] --- linux-2.6.20/net/netfilter/nfnetlink_log.c.32007-02-11 20:46:33.0 +0100 +++ linux-2.6.20/net/netfilter/nfnetlink_log.c 2007-02-11 20:46:26.0

[PATCH 2.6.20 00/10] nfnetlink_log: patch series introduction

2007-02-12 Thread Michał Mirosław
Dear list, After meeting a faint-hearted Linux kernel lately I decided to try myself at persuading it to not be afraid of NFLOG. This chat gave a series of ten commandments I present today. Take a look and agree or comment. Here's the list: 1. nfulnl_log_packet() - don't count the same thing

[PATCH 2.6.20 04/10] nfnetlink_log: fix possible use-after-free

2007-02-12 Thread Michał Mirosław
Paranoia: instance_put() might have freed the inst pointer when we spin_unlock_bh(). Signed-off-by: Michał Mirosław [EMAIL PROTECTED] --- linux-2.6.20/net/netfilter/nfnetlink_log.c.22007-02-11 20:43:24.0 +0100 +++ linux-2.6.20/net/netfilter/nfnetlink_log.c 2007-02-11 20:46

[PATCH 2.6.20 09/10] nfnetlink_log: fix NULL pointer dereference

2007-02-12 Thread Michał Mirosław
04 03 00 8b 53 34 8b 43 14 b9 40 00 00 00 e8 08 9a 84 EIP: [f8a4b3bf] __nfulnl_send+0x24/0x51 [nfnetlink_log] SS:ESP 0068:c03f5f30 0Kernel panic - not syncing: Fatal exception in interrupt 0Rebooting in 5 seconds.. Panic no more! Signed-off-by: Michał Mirosław [EMAIL PROTECTED] --- linux

[PATCH 2.6.20 01/10] nfnetlink_log: don't count max(a,b) twice

2007-02-12 Thread Michał Mirosław
We don't need local nlbufsiz (skb size) as nfulnl_alloc_skb() takes the maximum anyway. Signed-off-by: Michał Mirosław [EMAIL PROTECTED] --- linux-2.6.20/net/netfilter/nfnetlink_log.c.orig 2007-02-10 18:25:14.0 +0100 +++ linux-2.6.20/net/netfilter/nfnetlink_log.c 2007-02-11 20:20

[PATCH 2.6.20 03/10] nfnetlink_log: kill duplicate code

2007-02-12 Thread Michał Mirosław
Kill some duplicate code in nfulnl_log_packet(). Signed-off-by: Michał Mirosław [EMAIL PROTECTED] --- linux-2.6.20/net/netfilter/nfnetlink_log.c.12007-02-11 20:51:57.0 +0100 +++ linux-2.6.20/net/netfilter/nfnetlink_log.c 2007-02-11 20:43:24.0 +0100 @@ -666,30 +666,23

[PATCH 2.6.20 08/10] nfnetlink_log: shorten instances_lock holding time

2007-02-12 Thread Michał Mirosław
Shorten instances_lock window at the cost of doing unnecessary work on the failure case. I don't know if it makes sense actually. ; Signed-off-by: Michał Mirosław [EMAIL PROTECTED] --- linux-2.6.20/net/netfilter/nfnetlink_log.c.62007-02-11 22:31:19.0 +0100 +++ linux-2.6.20/net

[PATCH 2.6.20 07/10] nfnetlink_log: fix module reference counting

2007-02-12 Thread Michał Mirosław
Count module references correctly: after instance_destroy() there might be timer pending and holding a reference for this netlink instance. Signed-off-by: Michał Mirosław [EMAIL PROTECTED] --- linux-2.6.20/net/netfilter/nfnetlink_log.c.52007-02-11 22:24:56.0 +0100 +++ linux

Re: [PATCH 2.6.20 +0/14] nfnetlink_log: patch series season 2

2007-02-12 Thread Michał Mirosław
Dear list, As it turned out, not all worms eating nfnetlink_log have been exterminated by my last patch series. I'll append next four patches to the end of the series and I hope that it doesn't make your patching scripts unhappy. Those patches fix two bugs and make two other code

[PATCH 2.6.20 11/14] nfnetlink_log: iterator functions need iter_state * only

2007-02-12 Thread Michał Mirosław
get_*() don't need access to seq_file - iter_state is enough for them. Signed-off-by: Michał Mirosław [EMAIL PROTECTED] --- linux-2.6.20/net/netfilter/nfnetlink_log.c.92007-02-12 00:19:16.0 +0100 +++ linux-2.6.20/net/netfilter/nfnetlink_log.c 2007-02-12 17:05:14.0

[PATCH 2.6.20 13/14] nfnetlink_log: fix reference counting

2007-02-12 Thread Michał Mirosław
Fix reference counting (memory leak) problem in __nfulnl_send() and callers related to packet queueing. Signed-off-by: Michał Mirosław [EMAIL PROTECTED] --- linux-2.6.20/net/netfilter/nfnetlink_log.c.11 2007-02-12 17:35:50.0 +0100 +++ linux-2.6.20/net/netfilter/nfnetlink_log.c

[PATCH 2.6.20 14/14] nfnetlink_log: micro-optimization: inst-skb != NULL in __nfulnl_send()

2007-02-12 Thread Michał Mirosław
No other function calls __nfulnl_send() with inst-skb == NULL than nfulnl_timer(). Signed-off-by: Michał Mirosław [EMAIL PROTECTED] --- linux-2.6.20/net/netfilter/nfnetlink_log.c.12 2007-02-12 17:58:01.0 +0100 +++ linux-2.6.20/net/netfilter/nfnetlink_log.c 2007-02-12 17:58

Re: [PATCH 2.6.20 13/14] nfnetlink_log: fix reference counting

2007-02-14 Thread Michał Mirosław
On Tue, Feb 13, 2007 at 01:58:34PM +0100, Patrick McHardy wrote: Micha³ Miros³aw wrote: Fix reference counting (memory leak) problem in __nfulnl_send() and callers related to packet queueing. Signed-off-by: Michał Mirosław [EMAIL PROTECTED] --- linux-2.6.20/net/netfilter

Re: [PATCH 2.6.20 14/14] nfnetlink_log: micro-optimization: inst-skb != NULL in __nfulnl_send()

2007-02-14 Thread Michał Mirosław
Patch updated to apply after a new version of 13/14: No other function calls __nfulnl_send() with inst-skb == NULL than nfulnl_timer(). Signed-off-by: Michał Mirosław [EMAIL PROTECTED] --- linux-2.6.20/net/netfilter/nfnetlink_log.c.12 2007-02-14 12:27:09.0 +0100 +++ linux-2.6.20

[PATCH] regulator: show state for GPIO-controlled regulators

2013-02-01 Thread Michał Mirosław
Signed-off-by: Michał Mirosław mirq-li...@rere.qmqm.pl --- patch against https://github.com/torvalds/linux.git master drivers/regulator/core.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index 2785843..6b3550a 100644

Re: [PATCH 1/1] eventfd: implementation of EFD_MASK flag

2013-02-14 Thread Michał Mirosław
file_operations struct for this feature? Best Regards, Michał Mirosław -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org

Re: [RFT][PATCH 08/12] mmc: change cb710-mmc platform power management to use dev_pm_ops

2014-02-10 Thread Michał Mirosław
cb710_mmc_suspend() (or whatever you'll call it) to one ifdef block with cb710_mmc_dev_pm_ops. Best Regards, Michał Mirosław -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo

Re: [GIT] Networking

2013-05-02 Thread Michał Mirosław
in this case). Cc: commit's author. Best Regards, Michał Mirosław -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http

Re: [GIT] Networking

2013-05-02 Thread Michał Mirosław
removed some time ago, and flags don't depend on NETIF_F_*. Best Regards, Michał Mirosław -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ

Re: [PATCH 04/27] mmc: cb710: Move away from using deprecated APIs

2013-09-27 Thread Michał Mirosław
APIs. Cc: Michał Mirosław mirq-li...@rere.qmqm.pl Signed-off-by: Ulf Hansson ulf.hans...@linaro.org Patch looks consistent with commit message. I can't test it on HW, though. Acked-by: Michał Mirosław mirq-li...@rere.qmqm.pl -- To unsubscribe from this list: send the line unsubscribe linux

Re: [PATCH] mmc: cb710: drop free_irq for devm_request_irq allocated irq

2013-09-30 Thread Michał Mirosław
yongjun_...@trendmicro.com.cn Acked-by: Michał Mirosław mirq-li...@rere.qmqm.pl -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http

Re: [PATCH v4 2/2] net: moxa: replace build_skb() with netdev_alloc_skb_ip_align() / memcpy()

2014-08-21 Thread Michał Mirosław
, DMA_FROM_DEVICE); + dma_sync_single_for_device() is not needed here as CPU does not and should not write to the DMA_FROM_DEVICE mapping. skb-protocol = eth_type_trans(skb, ndev); napi_gro_receive(priv-napi, skb); rx++; Best Regards, Michał

Re: [dm-devel] [PATCH v3 01/12] crypto: LLVMLinux: Add macro to remove use of VLAIS in crypto code

2014-09-15 Thread Michał Mirosław
shash_desc *shash = (struct shash_desc *)__desc + char shash##__desc[] or similar? Otherwise it won't work if you use this macro twice in the same block. Best Regards, Michał Mirosław -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord

Re: [PATCH v2 net-next] net/core: generic support for disabling netdev features down stack

2016-04-01 Thread Michał Mirosław
nc_lower_features(dev, lower, features); > + [...] This should be equal in resulting flags to: netdev_for_each_lower_dev(dev, lower...) netdev_update_features(lower); because netdev_fix_features(lower) will see already changed dev->features. Best Regards, Michał Mirosław

[PATCH net-next 24/27] bpf_test: prepare for VLAN_TAG_PRESENT removal

2016-12-12 Thread Michał Mirosław
Signed-off-by: Michał Mirosław <mirq-li...@rere.qmqm.pl> --- lib/test_bpf.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/lib/test_bpf.c b/lib/test_bpf.c index 0362da0..00d3450 100644 --- a/lib/test_bpf.c +++ b/lib/test_bpf.c @@ -691,8 +691,13 @@ static struct bp

[PATCH net-next 23/27] net/bpf: split VLAN_PRESENT bit handling from VLAN_TCI

2016-12-12 Thread Michał Mirosław
Signed-off-by: Michał Mirosław <mirq-li...@rere.qmqm.pl> --- net/core/filter.c | 20 +--- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/net/core/filter.c b/net/core/filter.c index b146170..c3321f1 100644 --- a/net/core/filter.c +++ b/net/core/filter.c @@ -

Re: [PATCH RESEND v2 1/2] regulator: include 'enabled' status in debugfs/regulator_summary

2017-06-19 Thread Michał Mirosław
On Mon, Jun 19, 2017 at 11:17:41AM +0100, Mark Brown wrote: > On Sat, Jun 17, 2017 at 11:30:12PM +0200, Michał Mirosław wrote: > > Extend regulator's info line with enabled/disabled status. > Why is the use count not enough information here? Regulators can be enabled without any us

Re: [PATCH RESEND v2 1/2] regulator: include 'enabled' status in debugfs/regulator_summary

2017-06-19 Thread Michał Mirosław
On Mon, Jun 19, 2017 at 05:47:33PM +0100, Mark Brown wrote: > On Mon, Jun 19, 2017 at 06:41:34PM +0200, Michał Mirosław wrote: > > On Mon, Jun 19, 2017 at 11:17:41AM +0100, Mark Brown wrote: > > > On Sat, Jun 17, 2017 at 11:30:12PM +0200, Michał Mirosław wrote: > > > >

[PATCH v2 2/2] regulator: tps65910: Allow supply references to the same chip

2017-06-13 Thread Michał Mirosław
This allows for (acyclic) references from tps6591x supplies to its outputs. Signed-off-by: Michał Mirosław <mirq-li...@rere.qmqm.pl> --- v2: - no changes drivers/regulator/tps65910-regulator.c | 39 -- 1 file changed, 33 insertions(+), 6 deletions(-)

[PATCH v2 1/2] regulator: tps65910: check TPS65910_NUM_REGS at build time

2017-06-13 Thread Michał Mirosław
Check TPS65910_NUM_REGS at build time instead of silently registering not all regulators at runtime. Signed-off-by: Michał Mirosław <mirq-li...@rere.qmqm.pl> --- v2: - added commit message drivers/regulator/tps65910-regulator.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)

[PATCH 2/2] regulator: tps65910: Allow supply references to the same chip

2017-06-13 Thread Michał Mirosław
This allows for (acyclic) references from tps6591x supplies to its outputs. Signed-off-by: Michał Mirosław <mirq-li...@rere.qmqm.pl> --- drivers/regulator/tps65910-regulator.c | 39 -- 1 file changed, 33 insertions(+), 6 deletions(-) diff --git a/d

[PATCH 1/2] regulator: tps65910: check TPS65910_NUM_REGS at build time

2017-06-13 Thread Michał Mirosław
Signed-off-by: Michał Mirosław <mirq-li...@rere.qmqm.pl> --- drivers/regulator/tps65910-regulator.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/regulator/tps65910-regulator.c b/drivers/regulator/tps65910-regulator.c index 696116ebdf50a..81672a58fcc23

[PATCH v2 1/2] regulator: include 'enabled' status in debugfs/regulator_summary

2017-06-13 Thread Michał Mirosław
Extend regulator's info line with enabled/disabled status. Signed-off-by: Michał Mirosław <mirq-li...@rere.qmqm.pl> --- v2: - include commit message drivers/regulator/core.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/drivers/regulator/core.c b/d

[PATCH 2/2] regulator: use consumer->supply_name in debugfs/regulator_summary

2017-06-13 Thread Michał Mirosław
0mV 0mV Signed-off-by: Michał Mirosław <mirq-li...@rere.qmqm.pl> --- v2: - extend commit message drivers/regulator/core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index ba4d121ae07fc..a9bfabd132cff

[PATCH 1/2] regulator: include 'enabled' status in debugfs/regulator_summary

2017-06-13 Thread Michał Mirosław
Signed-off-by: Michał Mirosław <mirq-li...@rere.qmqm.pl> --- drivers/regulator/core.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index c0d9ae8d0860e..ba4d121ae07fc 100644 --- a/drivers/regulator/

[PATCH 2/2] regulator: use consumer->supply_name in debugfs/regulator_summary

2017-06-13 Thread Michał Mirosław
-dummy 1 02 0 0mV 0mA 0mV 0mV 1-0010-vccio0mV 0mV 1-0010-vcc330mV 0mV Signed-off-by: Michał Mirosław <mirq-li...@rere.qmqm.pl> --- d

Re: [PATCH 1/2] regulator: tps65910: check TPS65910_NUM_REGS at build time

2017-06-13 Thread Michał Mirosław
On Tue, Jun 13, 2017 at 07:31:21PM +0530, Keerthy wrote: > On Tuesday 13 June 2017 07:28 PM, Michał Mirosław wrote: > > Missing commit log? [...] Oh, indeed. I'll fix this in a moment. Best Regards, Michał Mirosław

[PATCH RESEND v2 1/2] regulator: include 'enabled' status in debugfs/regulator_summary

2017-06-17 Thread Michał Mirosław
Extend regulator's info line with enabled/disabled status. Signed-off-by: Michał Mirosław <mirq-li...@rere.qmqm.pl> --- v2: - include commit message drivers/regulator/core.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/drivers/regulator/core.c b/d

[PATCH RESEND v2 2/2] regulator: use consumer->supply_name in debugfs/regulator_summary

2017-06-17 Thread Michał Mirosław
0mV 0mV Signed-off-by: Michał Mirosław <mirq-li...@rere.qmqm.pl> --- v2: - extend commit message drivers/regulator/core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index ba4d121ae07f..a9bfabd132cf

[PATCH] regulator: tps65910: wire up sleep control configuration

2017-06-14 Thread Michał Mirosław
This enables configuring the PMIC's sleep mode via device-tree. A pointer indirection to sleep mode data is removed, as it simplifies the implementation slightly. References: 201cf052810d20814a77ca0e0045a2c1a3508a1f Signed-off-by: Michał Mirosław <mirq-li...@rere.qmqm.pl> --- Documen

Re: [PATCH] regulator: tps65910: wire up sleep control configuration

2017-06-14 Thread Michał Mirosław
On Wed, Jun 14, 2017 at 03:42:08PM +0100, Mark Brown wrote: > On Wed, Jun 14, 2017 at 02:25:13PM +0200, Michał Mirosław wrote: > > References: 201cf052810d20814a77ca0e0045a2c1a3508a1f > I have no idea what you mean by this, sorry. This is a commit id which introduced the feat

Re: [PATCH v2 2/2] regulator: tps65910: Allow supply references to the same chip

2017-06-13 Thread Michał Mirosław
On Tue, Jun 13, 2017 at 06:46:28PM +0100, Mark Brown wrote: > On Tue, Jun 13, 2017 at 04:41:58PM +0200, Michał Mirosław wrote: > > This allows for (acyclic) references from tps6591x supplies to > > its outputs. > This is clearly not something that should be open coded in in

Re: [PATCH] regulator: tps65910: wire up sleep control configuration

2017-06-14 Thread Michał Mirosław
On Wed, Jun 14, 2017 at 06:15:18PM +0100, Mark Brown wrote: > On Wed, Jun 14, 2017 at 05:13:29PM +0200, Michał Mirosław wrote: > > On Wed, Jun 14, 2017 at 03:42:08PM +0100, Mark Brown wrote: > > > On Wed, Jun 14, 2017 at 02:25:13PM +0200, Michał Mirosław wrote:

[PATCH v2] regulator: tps65910: wire up sleep control configuration

2017-06-14 Thread Michał Mirosław
This enables configuring the PMIC's sleep mode via device-tree. A pointer indirection to sleep mode data is removed, as it simplifies the implementation slightly. In current kernel tree, platform data structure is not used outside MFD cell drivers. Signed-off-by: Michał Mirosław <mirq

Re: [PATCH v2 2/2] regulator: tps65910: Allow supply references to the same chip

2017-06-14 Thread Michał Mirosław
t for now. Best Regards, Michał Mirosław

[PATCH 2/2] procfs: let userspace find out max /proc/pid/comm length

2017-08-31 Thread Michał Mirosław
Abuse llseek(SEEK_END) to return max /proc/pid/comm length. This is needed for pthread_getname_np to be able to return ERANGE without modifying thread's name. Signed-off-by: Michał Mirosław <mirq-li...@rere.qmqm.pl> --- fs/proc/base.c | 11 ++- 1 file changed, 10 insertions

[PATCH 1/2] procfs: signal /proc/pid/comm write truncation

2017-08-31 Thread Michał Mirosław
Keeps truncation working, but also signals to writing process when that happens. Fixes: 830e0fc967a7 ("fs, proc: truncate /proc/pid/comm writes to first TASK_COMM_LEN bytes") Signed-off-by: Michał Mirosław <mirq-li...@rere.qmqm.pl> --- fs/proc/base.c | 11 ++- 1

[PATCH] prctl: prepare for bigger TASK_COMM_LEN

2017-08-31 Thread Michał Mirosław
Linux prctl(PR_SET/GET_NAME) is documented and assumed to use 16-byte fixed-size buffers for thread name. There is /proc/[pid]/comm interface that has no such limit. This is one step to removing TASK_COMM_LEN 16-byte limit. Signed-off-by: Michał Mirosław <mirq-li...@rere.qmqm.pl> ---

[PATCH 0/2] procfs: /proc/pid/comm fixes

2017-08-31 Thread Michał Mirosław
These two patches are preparation for extending TASK_COMM_LEN above current 16-byte limit. Michał Mirosław (2): procfs: signal /proc/pid/comm write truncation procfs: let userspace find out max /proc/pid/comm length fs/proc/base.c | 22 -- 1 file changed, 20 insertions

Re: [PATCH 11/26] cb710: Convert to new IDA API

2018-06-21 Thread Michał Mirosław
On Thu, Jun 21, 2018 at 02:28:20PM -0700, Matthew Wilcox wrote: > Eliminates the custom spinlock and the call to ida_pre_get. > > Signed-off-by: Matthew Wilcox Acked-by: Michał Mirosław

Re: [PATCH 2.6.20 13/14] nfnetlink_log: fix reference counting

2007-02-14 Thread Michał Mirosław
On Tue, Feb 13, 2007 at 01:58:34PM +0100, Patrick McHardy wrote: > Micha³ Miros³aw wrote: > > Fix reference counting (memory leak) problem in __nfulnl_send() and callers > > related to packet queueing. > > > > Signed-off-by: Michał Mirosław <[EMAIL PROTECTED]&

Re: [PATCH 2.6.20 14/14] nfnetlink_log: micro-optimization: inst->skb != NULL in __nfulnl_send()

2007-02-14 Thread Michał Mirosław
Patch updated to apply after a new version of 13/14: No other function calls __nfulnl_send() with inst->skb == NULL than nfulnl_timer(). Signed-off-by: Michał Mirosław <[EMAIL PROTECTED]> --- linux-2.6.20/net/netfilter/nfnetlink_log.c.12 2007-02-14 12:27:09.0 +0100

[PATCH 2.6.20 06/10] nfnetlink_log: micro-optimization: don't modify destroyed instance

2007-02-12 Thread Michał Mirosław
Simple micro-optimization: Don't change any options if the instance is being destroyed. Signed-off-by: Michał Mirosław <[EMAIL PROTECTED]> --- linux-2.6.20/net/netfilter/nfnetlink_log.c.42007-02-11 20:46:26.0 +0100 +++ linux-2.6.20/net/netfilter/nfnetlink_log.c 2007-02-11

[PATCH 2.6.20 10/10] nfnetlink_log: enable packet timestamps

2007-02-12 Thread Michał Mirosław
It's nice to log packet arrival time of those little filthy packets. ;) Signed-off-by: Michał Mirosław <[EMAIL PROTECTED]> --- linux-2.6.20/net/netfilter/nfnetlink_log.c.82007-02-11 23:59:01.0 +0100 +++ linux-2.6.20/net/netfilter/nfnetlink_log.c 2007-02-12 00:19:16.000

[PATCH 2.6.20 02/10] nfnetlink_log: stop reference leak

2007-02-12 Thread Michał Mirosław
Stop reference leaking in nfulnl_log_packet(). If we start a timer we are already taking another reference. Signed-off-by: Michał Mirosław <[EMAIL PROTECTED]> --- linux-2.6.20/net/netfilter/nfnetlink_log.c.02007-02-11 20:20:27.0 +0100 +++ linux-2.6.20/net/net

[PATCH 2.6.20 05/10] nfnetlink_log: micro-optimization for inst==NULL in nfulnl_recv_config()

2007-02-12 Thread Michał Mirosław
Simple micro-optimization: don't call instance_put() on known NULL pointers. Signed-off-by: Michał Mirosław <[EMAIL PROTECTED]> --- linux-2.6.20/net/netfilter/nfnetlink_log.c.32007-02-11 20:46:33.0 +0100 +++ linux-2.6.20/net/netfilter/nfnetlink_log.c 2007-02-11

[PATCH 2.6.20 00/10] nfnetlink_log: patch series introduction

2007-02-12 Thread Michał Mirosław
Dear list, After meeting a faint-hearted Linux kernel lately I decided to try myself at persuading it to not be afraid of NFLOG. This chat gave a series of ten commandments I present today. Take a look and agree or comment. Here's the list: 1. nfulnl_log_packet() - don't count the same thing

[PATCH 2.6.20 04/10] nfnetlink_log: fix possible use-after-free

2007-02-12 Thread Michał Mirosław
Paranoia: instance_put() might have freed the inst pointer when we spin_unlock_bh(). Signed-off-by: Michał Mirosław <[EMAIL PROTECTED]> --- linux-2.6.20/net/netfilter/nfnetlink_log.c.22007-02-11 20:43:24.0 +0100 +++ linux-2.6.20/net/netfilter/nfnetlink_log.c 2007-02-11

[PATCH 2.6.20 09/10] nfnetlink_log: fix NULL pointer dereference

2007-02-12 Thread Michał Mirosław
4/0x51 [nfnetlink_log] SS:ESP 0068:c03f5f30 <0>Kernel panic - not syncing: Fatal exception in interrupt <0>Rebooting in 5 seconds.. Panic no more! Signed-off-by: Michał Mirosław <[EMAIL PROTECTED]> --- linux-2.6.20/net/netfilter/nfnetlink_log.c.72007-02-11 22:41:18.

[PATCH 2.6.20 01/10] nfnetlink_log: don't count max(a,b) twice

2007-02-12 Thread Michał Mirosław
We don't need local nlbufsiz (skb size) as nfulnl_alloc_skb() takes the maximum anyway. Signed-off-by: Michał Mirosław <[EMAIL PROTECTED]> --- linux-2.6.20/net/netfilter/nfnetlink_log.c.orig 2007-02-10 18:25:14.0 +0100 +++ linux-2.6.20/net/netfilter/nfnetlink_log.c 2007-02-11

[PATCH 2.6.20 03/10] nfnetlink_log: kill duplicate code

2007-02-12 Thread Michał Mirosław
Kill some duplicate code in nfulnl_log_packet(). Signed-off-by: Michał Mirosław <[EMAIL PROTECTED]> --- linux-2.6.20/net/netfilter/nfnetlink_log.c.12007-02-11 20:51:57.0 +0100 +++ linux-2.6.20/net/netfilter/nfnetlink_log.c 2007-02-11 20:43:24.0 +0100 @@ -666,30 +

[PATCH 2.6.20 08/10] nfnetlink_log: shorten instances_lock holding time

2007-02-12 Thread Michał Mirosław
Shorten instances_lock window at the cost of doing unnecessary work on the failure case. I don't know if it makes sense actually. ;> Signed-off-by: Michał Mirosław <[EMAIL PROTECTED]> --- linux-2.6.20/net/netfilter/nfnetlink_log.c.62007-02-11 22:31:19.0 +0100 +++ lin

[PATCH 2.6.20 07/10] nfnetlink_log: fix module reference counting

2007-02-12 Thread Michał Mirosław
Count module references correctly: after instance_destroy() there might be timer pending and holding a reference for this netlink instance. Signed-off-by: Michał Mirosław <[EMAIL PROTECTED]> --- linux-2.6.20/net/netfilter/nfnetlink_log.c.52007-02-11 22:24:56.0 +0100 +++

Re: [PATCH 2.6.20 +0/14] nfnetlink_log: patch series season 2

2007-02-12 Thread Michał Mirosław
Dear list, As it turned out, not all worms eating nfnetlink_log have been exterminated by my last patch series. I'll append next four patches to the end of the series and I hope that it doesn't make your patching scripts unhappy. Those patches fix two bugs and make two other code

[PATCH 2.6.20 11/14] nfnetlink_log: iterator functions need iter_state * only

2007-02-12 Thread Michał Mirosław
get_*() don't need access to seq_file - iter_state is enough for them. Signed-off-by: Michał Mirosław <[EMAIL PROTECTED]> --- linux-2.6.20/net/netfilter/nfnetlink_log.c.92007-02-12 00:19:16.0 +0100 +++ linux-2.6.20/net/netfilter/nfnetlink_log.c 2007-02-12 17:05:14.000

[PATCH 2.6.20 12/14] nfnetlink_log: possible NULL pointer dereference in nfulnl_recv_config()

2007-02-12 Thread Michał Mirosław
Eliminate possible NULL pointer dereference in nfulnl_recv_config(). Signed-off-by: Michał Mirosław <[EMAIL PROTECTED]> --- linux-2.6.20/net/netfilter/nfnetlink_log.c.10 2007-02-12 17:05:14.0 +0100 +++ linux-2.6.20/net/netfilter/nfnetlink_log.c 2007-02-12 17:35:50.000

[PATCH 2.6.20 13/14] nfnetlink_log: fix reference counting

2007-02-12 Thread Michał Mirosław
Fix reference counting (memory leak) problem in __nfulnl_send() and callers related to packet queueing. Signed-off-by: Michał Mirosław <[EMAIL PROTECTED]> --- linux-2.6.20/net/netfilter/nfnetlink_log.c.11 2007-02-12 17:35:50.0 +0100 +++ linux-2.6.20/net/netfilter/nfnetlink

[PATCH 2.6.20 14/14] nfnetlink_log: micro-optimization: inst->skb != NULL in __nfulnl_send()

2007-02-12 Thread Michał Mirosław
No other function calls __nfulnl_send() with inst->skb == NULL than nfulnl_timer(). Signed-off-by: Michał Mirosław <[EMAIL PROTECTED]> --- linux-2.6.20/net/netfilter/nfnetlink_log.c.12 2007-02-12 17:58:01.0 +0100 +++ linux-2.6.20/net/netfilter/nfnetlink_log.c 2007-02

[PATCH] regulator: show state for GPIO-controlled regulators

2013-02-01 Thread Michał Mirosław
Signed-off-by: Michał Mirosław --- patch against https://github.com/torvalds/linux.git master drivers/regulator/core.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index 2785843..6b3550a 100644 --- a/drivers

Re: [GIT] Networking

2013-05-02 Thread Michał Mirosław
is certainly a bug in NM, and a fresh one: commit b636ea86b1c0a28b77eda311c84d3b2417cad22e from 2013-04-10 14:40:58 (GMT). Userspace is expected to use ETHTOOL_GSTRINGS for ETH_SS_FEATURES and find a corresponding bit position by feature name ("vlan-challenged" in this case). Cc: commit'

Re: [GIT] Networking

2013-05-02 Thread Michał Mirosław
thing cares about the .../eth0/flags value because with the bit > ordering different for bits 10 and above things break. Are you sure it's "flags"? /sys/class/net/*/features were removed some time ago, and flags don't depend on NETIF_F_*. Best Regards, Michał Mirosław -- To unsubscri

Re: [RFT][PATCH 08/12] mmc: change cb710-mmc platform power management to use dev_pm_ops

2014-02-10 Thread Michał Mirosław
ould move cb710_mmc_suspend() (or whatever you'll call it) to one ifdef block with cb710_mmc_dev_pm_ops. Best Regards, Michał Mirosław -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at htt

Re: [PATCH 04/27] mmc: cb710: Move away from using deprecated APIs

2013-09-27 Thread Michał Mirosław
ng the > use of the deprecated APIs. > > Cc: Michał Mirosław > Signed-off-by: Ulf Hansson Patch looks consistent with commit message. I can't test it on HW, though. Acked-by: Michał Mirosław -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a me

Re: [PATCH] mmc: cb710: drop free_irq for devm_request_irq allocated irq

2013-09-30 Thread Michał Mirosław
On Tue, Sep 24, 2013 at 10:40:57AM +0800, Wei Yongjun wrote: > From: Wei Yongjun > > irq allocated with devm_request_irq should not be freed using > free_irq, because doing so causes a dangling pointer, and a > subsequent double free. > > Signed-off-by: Wei Yongjun Acke

Re: [PATCH v4 2/2] net: moxa: replace build_skb() with netdev_alloc_skb_ip_align() / memcpy()

2014-08-21 Thread Michał Mirosław
mapping. > skb->protocol = eth_type_trans(skb, ndev); > napi_gro_receive(>napi, skb); > rx++; Best Regards, Michał Mirosław -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

[PATCH] prctl: prepare for bigger TASK_COMM_LEN

2017-08-31 Thread Michał Mirosław
Linux prctl(PR_SET/GET_NAME) is documented and assumed to use 16-byte fixed-size buffers for thread name. There is /proc/[pid]/comm interface that has no such limit. This is one step to removing TASK_COMM_LEN 16-byte limit. Signed-off-by: Michał Mirosław --- kernel/sys.c | 11 --- 1

[PATCH 0/2] procfs: /proc/pid/comm fixes

2017-08-31 Thread Michał Mirosław
These two patches are preparation for extending TASK_COMM_LEN above current 16-byte limit. Michał Mirosław (2): procfs: signal /proc/pid/comm write truncation procfs: let userspace find out max /proc/pid/comm length fs/proc/base.c | 22 -- 1 file changed, 20 insertions

[PATCH 1/2] procfs: signal /proc/pid/comm write truncation

2017-08-31 Thread Michał Mirosław
Keeps truncation working, but also signals to writing process when that happens. Fixes: 830e0fc967a7 ("fs, proc: truncate /proc/pid/comm writes to first TASK_COMM_LEN bytes") Signed-off-by: Michał Mirosław --- fs/proc/base.c | 11 ++- 1 file changed, 10 insertions(+),

[PATCH 2/2] procfs: let userspace find out max /proc/pid/comm length

2017-08-31 Thread Michał Mirosław
Abuse llseek(SEEK_END) to return max /proc/pid/comm length. This is needed for pthread_getname_np to be able to return ERANGE without modifying thread's name. Signed-off-by: Michał Mirosław --- fs/proc/base.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/fs

Re: [PATCH RESEND v8 2/4] input: elants: support old touch report format

2021-01-22 Thread Michał Mirosław
On Fri, Jan 22, 2021 at 11:10:52PM +0300, Dmitry Osipenko wrote: > 08.01.2021 01:06, Dmitry Osipenko пишет: > > 11.12.2020 21:48, Dmitry Torokhov пишет: > >> On Fri, Dec 11, 2020 at 06:04:01PM +0100, Michał Mirosław wrote: > >>> On Fri, Dec 11, 2020 at 07:39:33P

Re: [PATCH] iio: adc: exynos: do not rely on 'users' counter in ISR

2020-10-05 Thread Michał Mirosław
On Mon, Oct 05, 2020 at 10:36:36AM -0700, dmitry.torok...@gmail.com wrote: > Hi Michał, > > On Mon, Oct 05, 2020 at 01:09:08PM +0200, Michał Mirosław wrote: > > On Sun, Oct 04, 2020 at 10:24:20PM -0700, dmitry.torok...@gmail.com wrote: > > > The order in which 'users' c

Re: [PATCH v2] iio: adc: exynos: do not rely on 'users' counter in ISR

2020-10-06 Thread Michał Mirosław
> to exit when device is being closed. > > This has a side-effect of fixing issue of accessing inut->users > outside of input->mutex protection. [...] Reviewed-by: Michał Mirosław (after with a fix mentioned below) > --- a/drivers/iio/adc/exynos_adc.c > +++ b/drivers/iio/a

Re: [PATCH] iio: adc: exynos: do not rely on 'users' counter in ISR

2020-10-05 Thread Michał Mirosław
paired with READ_ONCE in the ISR. But is the check really needed? I see that this is to break waiting for a touch release event, so I would assume this shouldn't wait forever (unless the hardware is buggy) and breaking the loop will desync touch state (I would guess this would be noticable by next user). Best Regards, Michał Mirosław

[PATCH] regulator: fix pointer table overallocation

2020-08-09 Thread Michał Mirosław
The code allocates sizeof(regulator_dev) for a pointer. Make it less generous. Let kcalloc() calculate the size, while at it. Cc: sta...@vger.kernel.org Fixes: d8ca7d184b33 ("regulator: core: Introduce API for regulators coupling customization") Signed-off-by: Michał Mirosław --

[PATCH] regulator: simplify locking

2020-08-09 Thread Michał Mirosław
Simplify regulator locking by removing locking around locking. rdev->ref is now accessed only when the lock is taken. The code still smells fishy, but now its obvious why. Fixes: f8702f9e4aa7 ("regulator: core: Use ww_mutex for regulators locking") Signed-off-by: Michał Mirosław

regulator: deadlock vs memory reclaim

2020-08-09 Thread Michał Mirosław
ay to much (eg. initialization even before making the regulator visible to the system). To fix the regulator vs memory reclaim path I tried pushing all allocations out of protected sections. After doing a few patches, though, I'm not sure I'm going in the right direction. Your thoughts? Best Rega

Re: [PATCH] regulator: simplify locking

2020-08-09 Thread Michał Mirosław
On Mon, Aug 10, 2020 at 12:40:04AM +0300, Dmitry Osipenko wrote: > 10.08.2020 00:16, Michał Mirosław пишет: > > Simplify regulator locking by removing locking around locking. rdev->ref > > is now accessed only when the lock is taken. The code still smells fishy, > >

Re: [PATCH] regulator: simplify locking

2020-08-09 Thread Michał Mirosław
On Mon, Aug 10, 2020 at 03:21:47AM +0300, Dmitry Osipenko wrote: > 10.08.2020 01:30, Michał Mirosław пишет: > > On Mon, Aug 10, 2020 at 12:40:04AM +0300, Dmitry Osipenko wrote: > >> 10.08.2020 00:16, Michał Mirosław пишет: > >>> Simplify regulator locking by removin

Re: [PATCH] regulator: simplify locking

2020-08-09 Thread Michał Mirosław
On Mon, Aug 10, 2020 at 03:21:47AM +0300, Dmitry Osipenko wrote: > 10.08.2020 01:30, Michał Mirosław пишет: > > On Mon, Aug 10, 2020 at 12:40:04AM +0300, Dmitry Osipenko wrote: > >> 10.08.2020 00:16, Michał Mirosław пишет: > >>> Simplify regulator locking by removin

[PATCH 3/3] regulator: unexport regulator_lock/unlock()

2020-08-09 Thread Michał Mirosław
regulator_lock/unlock() was used only to guard regulator_notifier_call_chain(). As no users remain, make the functions internal. Signed-off-by: Michał Mirosław --- drivers/regulator/core.c | 6 ++ include/linux/regulator/driver.h | 3 --- 2 files changed, 2 insertions(+), 7

[PATCH 1/3] regulator: don't require mutex for regulator_notifier_call_chain()

2020-08-09 Thread Michał Mirosław
d to be taken recursively. Signed-off-by: Michał Mirosław --- drivers/regulator/core.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index b0662927487c..f4035167e7ba 100644 --- a/drivers/regulator/core.c +++ b/drivers/reg

[PATCH 2/3] regulator: remove locking around regulator_notifier_call_chain()

2020-08-09 Thread Michał Mirosław
regulator_notifier_call_chain() doesn't need rdev lock and rdev's existence is assumed in the code anyway. Remove the locks from drivers. Signed-off-by: Michał Mirosław --- drivers/regulator/da9055-regulator.c | 2 -- drivers/regulator/da9062-regulator.c | 2 -- drivers/regulator/da9063

[PATCH 0/3] regulator: unexport regulator_lock/unlock()

2020-08-09 Thread Michał Mirosław
client that needed recursive locking from the notifier chain was drivers/usb/host/ohci-da8xx.c, which responds to over-current notification by calling regulator_disable(). Michał Mirosław (3): regulator: don't require mutex for regulator_notifier_call_chain() regulator: remove locking around

Re: regulator: deadlock vs memory reclaim

2020-08-10 Thread Michał Mirosław
On Mon, Aug 10, 2020 at 04:39:28PM +0100, Mark Brown wrote: > On Mon, Aug 10, 2020 at 12:25:37AM +0200, Michał Mirosław wrote: > > > regulator_lock_dependent() starts by taking regulator_list_mutex, The > > same mutex covers eg. regulator initialization, including

Re: [PATCH] regulator: simplify locking

2020-08-10 Thread Michał Mirosław
On Mon, Aug 10, 2020 at 08:14:20AM +0300, Dmitry Osipenko wrote: > 10.08.2020 03:59, Michał Mirosław пишет: > > On Mon, Aug 10, 2020 at 03:21:47AM +0300, Dmitry Osipenko wrote: > >> 10.08.2020 01:30, Michał Mirosław пишет: > >>> On Mon, Aug 10, 2020 at 12:40:04A

Re: [PATCH] regulator: fix pointer table overallocation

2020-08-10 Thread Michał Mirosław
On Mon, Aug 10, 2020 at 01:37:47PM +0100, Mark Brown wrote: > On Sun, Aug 09, 2020 at 10:44:25PM +0300, Dmitry Osipenko wrote: > > 09.08.2020 22:21, Michał Mirosław пишет: > > > The code allocates sizeof(regulator_dev) for a pointer. Make it less > > > generous. Let k

Re: [PATCH] regulator: fix pointer table overallocation

2020-08-10 Thread Michał Mirosław
On Mon, Aug 10, 2020 at 06:33:37PM +0100, Mark Brown wrote: > On Mon, Aug 10, 2020 at 06:25:56PM +0200, Michał Mirosław wrote: > > On Mon, Aug 10, 2020 at 01:37:47PM +0100, Mark Brown wrote: > > > Yeah, this is more a performance improvement than a fix. > > Should I r

  1   2   3   4   >