<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/drivers/connector, branch v3.0</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.0</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.0'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2011-06-07T19:02:00Z</updated>
<entry>
<title>Connector: Correctly set the error code in case of success when dispatching receive callbacks</title>
<updated>2011-06-07T19:02:00Z</updated>
<author>
<name>K. Y. Srinivasan</name>
<email>kys@microsoft.com</email>
</author>
<published>2011-05-17T22:25:38Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=663dd6dcaf7e95526e469e91f41972a9c0cca30c'/>
<id>urn:sha1:663dd6dcaf7e95526e469e91f41972a9c0cca30c</id>
<content type='text'>
The recent changes to the connector code introduced this bug where even
when a callback was invoked, we would return an error resulting in
double freeing of the skb. This patch fixes this bug.

Signed-off-by: K. Y. Srinivasan &lt;kys@microsoft.com&gt;
Acked-by: Evgeniy Polyakov &lt;zbr@ioremap.net&gt;
Cc: stable &lt;stable@kernel.org&gt;  [.39]
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
</entry>
<entry>
<title>connector: fix skb double free in cn_rx_skb()</title>
<updated>2011-04-12T21:38:57Z</updated>
<author>
<name>Patrick McHardy</name>
<email>kaber@trash.net</email>
</author>
<published>2011-04-12T05:39:51Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=0e08785845093ef4ed220463a739bc8d0db95de7'/>
<id>urn:sha1:0e08785845093ef4ed220463a739bc8d0db95de7</id>
<content type='text'>
When a skb is delivered to a registered callback, cn_call_callback()
incorrectly returns -ENODEV after freeing the skb, causing cn_rx_skb()
to free the skb a second time.

Reported-by: Eric B Munson &lt;emunson@mgebm.net&gt;
Signed-off-by: Patrick McHardy &lt;kaber@trash.net&gt;
Tested-by: Eric B Munson &lt;emunson@mgebm.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>connector: convert to synchronous netlink message processing</title>
<updated>2011-03-31T00:14:33Z</updated>
<author>
<name>Patrick McHardy</name>
<email>kaber@trash.net</email>
</author>
<published>2011-03-28T08:39:36Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=04f482faf50535229a5a5c8d629cf963899f857c'/>
<id>urn:sha1:04f482faf50535229a5a5c8d629cf963899f857c</id>
<content type='text'>
Commits 01a16b21 (netlink: kill eff_cap from struct netlink_skb_parms)
and c53fa1ed (netlink: kill loginuid/sessionid/sid members from struct
netlink_skb_parms) removed some members from struct netlink_skb_parms
that depend on the current context, all netlink users are now required
to do synchronous message processing.

connector however queues received messages and processes them in a work
queue, which is not valid anymore. This patch converts connector to do
synchronous message processing by invoking the registered callback handler
directly from the netlink receive function.

In order to avoid invoking the callback with connector locks held, a
reference count is added to struct cn_callback_entry, the reference
is taken when finding a matching callback entry on the device's queue_list
and released after the callback handler has been invoked.

Signed-off-by: Patrick McHardy &lt;kaber@trash.net&gt;
Acked-by: Evgeniy Polyakov &lt;zbr@ioremap.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>connector: Convert char *name to const char *name</title>
<updated>2011-02-23T21:22:26Z</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2011-02-19T23:45:29Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=008536e8458613ce569595e43b0e71afa8b48ae8'/>
<id>urn:sha1:008536e8458613ce569595e43b0e71afa8b48ae8</id>
<content type='text'>
Allow more const declarations.

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Acked-by: Evgeniy Polyakov &lt;zbr@ioremap.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
</entry>
<entry>
<title>connector: Use this_cpu operations</title>
<updated>2010-12-17T14:18:05Z</updated>
<author>
<name>Christoph Lameter</name>
<email>cl@linux.com</email>
</author>
<published>2010-12-08T16:42:23Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=3ea9f6833c8f865a221b59ce37d7650dcf3b3e17'/>
<id>urn:sha1:3ea9f6833c8f865a221b59ce37d7650dcf3b3e17</id>
<content type='text'>
The patch was originally in the use cpuops patchset but it needs an
inc_return and is therefore dependent on an extension of the cpu ops.
Fixed up and verified that it compiles.

get_seq can benefit from this_cpu_operations.  Address calculation is
avoided and the increment is done using an xadd.

Cc: Scott James Remnant &lt;scott@ubuntu.com&gt;
Cc: Mike Frysinger &lt;vapier@gentoo.org&gt;
Acked-by: H. Peter Anvin &lt;hpa@zytor.com&gt;
Signed-off-by: Christoph Lameter &lt;cl@linux.com&gt;
Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
</content>
</entry>
<entry>
<title>connector: add module alias</title>
<updated>2010-12-10T20:27:49Z</updated>
<author>
<name>Stephen Hemminger</name>
<email>shemminger@vyatta.com</email>
</author>
<published>2010-12-10T20:27:49Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=3700c3c2934467d53d443682f020cc5c1f75f1f2'/>
<id>urn:sha1:3700c3c2934467d53d443682f020cc5c1f75f1f2</id>
<content type='text'>
Since connector can be built as a module and uses netlink socket
to communicate. The module should have an alias to autoload when socket
of NETLINK_CONNECTOR type is requested.

Signed-off-by: Stephen Hemminger &lt;shemminger@vyatta.com&gt;
Acked-by: Evgeniy Polyakov &lt;zbr@ioremap.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;

</content>
</entry>
<entry>
<title>connector: remove lazy workqueue creation</title>
<updated>2010-10-24T21:20:01Z</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2010-10-14T23:55:22Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=6cebb17beece746de86793cd549e84740896cf4a'/>
<id>urn:sha1:6cebb17beece746de86793cd549e84740896cf4a</id>
<content type='text'>
Commit 1a5645bc (connector: create connector workqueue only while
needed once) implements lazy workqueue creation for connector
workqueue.  With cmwq now in place, lazy workqueue creation doesn't
make much sense while adding a lot of complexity.  Remove it and
allocate an ordered workqueue during initialization.

This also removes a call to flush_scheduled_work() which is deprecated
and scheduled to be removed.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Cc: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h</title>
<updated>2010-03-30T13:02:32Z</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2010-03-24T08:04:11Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=5a0e3ad6af8660be21ca98a971cd00f331318c05'/>
<id>urn:sha1:5a0e3ad6af8660be21ca98a971cd00f331318c05</id>
<content type='text'>
percpu.h is included by sched.h and module.h and thus ends up being
included when building most .c files.  percpu.h includes slab.h which
in turn includes gfp.h making everything defined by the two files
universally available and complicating inclusion dependencies.

percpu.h -&gt; slab.h dependency is about to be removed.  Prepare for
this change by updating users of gfp and slab facilities include those
headers directly instead of assuming availability.  As this conversion
needs to touch large number of source files, the following script is
used as the basis of conversion.

  http://userweb.kernel.org/~tj/misc/slabh-sweep.py

The script does the followings.

* Scan files for gfp and slab usages and update includes such that
  only the necessary includes are there.  ie. if only gfp is used,
  gfp.h, if slab is used, slab.h.

* When the script inserts a new include, it looks at the include
  blocks and try to put the new include such that its order conforms
  to its surrounding.  It's put in the include block which contains
  core kernel includes, in the same order that the rest are ordered -
  alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
  doesn't seem to be any matching order.

* If the script can't find a place to put a new include (mostly
  because the file doesn't have fitting include block), it prints out
  an error message indicating which .h file needs to be added to the
  file.

The conversion was done in the following steps.

1. The initial automatic conversion of all .c files updated slightly
   over 4000 files, deleting around 700 includes and adding ~480 gfp.h
   and ~3000 slab.h inclusions.  The script emitted errors for ~400
   files.

2. Each error was manually checked.  Some didn't need the inclusion,
   some needed manual addition while adding it to implementation .h or
   embedding .c file was more appropriate for others.  This step added
   inclusions to around 150 files.

3. The script was run again and the output was compared to the edits
   from #2 to make sure no file was left behind.

4. Several build tests were done and a couple of problems were fixed.
   e.g. lib/decompress_*.c used malloc/free() wrappers around slab
   APIs requiring slab.h to be added manually.

5. The script was run on all .h files but without automatically
   editing them as sprinkling gfp.h and slab.h inclusions around .h
   files could easily lead to inclusion dependency hell.  Most gfp.h
   inclusion directives were ignored as stuff from gfp.h was usually
   wildly available and often used in preprocessor macros.  Each
   slab.h inclusion directive was examined and added manually as
   necessary.

6. percpu.h was updated not to include slab.h.

7. Build test were done on the following configurations and failures
   were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
   distributed build env didn't work with gcov compiles) and a few
   more options had to be turned off depending on archs to make things
   build (like ipr on powerpc/64 which failed due to missing writeq).

   * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
   * powerpc and powerpc64 SMP allmodconfig
   * sparc and sparc64 SMP allmodconfig
   * ia64 SMP allmodconfig
   * s390 SMP allmodconfig
   * alpha SMP allmodconfig
   * um on x86_64 SMP allmodconfig

8. percpu.h modifications were reverted so that it could be applied as
   a separate patch and serve as bisection point.

Given the fact that I had only a couple of failures from tests on step
6, I'm fairly confident about the coverage of this conversion patch.
If there is a breakage, it's likely to be something in one of the arch
headers which should be easily discoverable easily on most builds of
the specific arch.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Guess-its-ok-by: Christoph Lameter &lt;cl@linux-foundation.org&gt;
Cc: Ingo Molnar &lt;mingo@redhat.com&gt;
Cc: Lee Schermerhorn &lt;Lee.Schermerhorn@hp.com&gt;
</content>
</entry>
<entry>
<title>connector: Delete buggy notification code.</title>
<updated>2010-02-02T23:58:48Z</updated>
<author>
<name>Evgeniy Polyakov</name>
<email>zbr@ioremap.net</email>
</author>
<published>2010-02-02T23:58:48Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=f98bfbd78c37c5946cc53089da32a5f741efdeb7'/>
<id>urn:sha1:f98bfbd78c37c5946cc53089da32a5f741efdeb7</id>
<content type='text'>
On Tue, Feb 02, 2010 at 02:57:14PM -0800, Greg KH (gregkh@suse.de) wrote:
&gt; &gt; There are at least two ways to fix it: using a big cannon and a small
&gt; &gt; one. The former way is to disable notification registration, since it is
&gt; &gt; not used by anyone at all. Second way is to check whether calling
&gt; &gt; process is root and its destination group is -1 (kind of priveledged
&gt; &gt; one) before command is dispatched to workqueue.
&gt; 
&gt; Well if no one is using it, removing it makes the most sense, right?
&gt; 
&gt; No objection from me, care to make up a patch either way for this?

Getting it is not used, let's drop support for notifications about
(un)registered events from connector.
Another option was to check credentials on receiving, but we can always
restore it without bugs if needed, but genetlink has a wider code base
and none complained, that userspace can not get notification when some
other clients were (un)registered.

Kudos for Sebastian Krahmer &lt;krahmer@suse.de&gt;, who found a bug in the
code.

Signed-off-by: Evgeniy Polyakov &lt;zbr@ioremap.net&gt;
Acked-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>connector: Fix incompatible pointer type warning</title>
<updated>2009-10-06T08:39:51Z</updated>
<author>
<name>Stephen Boyd</name>
<email>bebarino@gmail.com</email>
</author>
<published>2009-10-06T08:39:51Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=f0b25932b8e60e96f5f371b27442e560803ac6f5'/>
<id>urn:sha1:f0b25932b8e60e96f5f371b27442e560803ac6f5</id>
<content type='text'>
Commit 7069331 (connector: Provide the sender's credentials to the
callback, 2009-10-02) changed callbacks to take two arguments but missed
this one.

drivers/connector/cn_proc.c: In function ‘cn_proc_init’:
drivers/connector/cn_proc.c:263: warning: passing argument 3 of
‘cn_add_callback’ from incompatible pointer type

Signed-off-by: Stephen Boyd &lt;bebarino@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
