Linux backports project
 help / color / mirror / Atom feed
* wireless_nlevent_flush backported to stable kernels
@ 2016-05-15  6:25 Emmanuel Grumbach
  2016-05-15  9:50 ` Arend Van Spriel
  0 siblings, 1 reply; 5+ messages in thread
From: Emmanuel Grumbach @ 2016-05-15  6:25 UTC (permalink / raw)
  To: backports@vger.kernel.org

Hi,

Johanne's patch:

commit cb150b9d23be6ee7f3a0fff29784f1c5b5ac514d
Author: Johannes Berg <johannes.berg@intel.com>
Date:   Wed Jan 27 13:29:34 2016 +0100

    cfg80211/wext: fix message ordering


has been backported to more stable kernels and hence backport needs to
take that into account.
I am using Ubuntu's wily kernel (4.2 based) and apparently, they
backported Johanne's fix as well.

On my system, I fixed it with the patch below, but it is surely not good enough.

diff --git a/backport-include/net/iw_handler.h
b/backport-include/net/iw_handler.h
index e205d1e..b9c0144 100644
--- a/backport-include/net/iw_handler.h
+++ b/backport-include/net/iw_handler.h
@@ -25,7 +25,8 @@ iwe_stream_add_point_check(struct iw_request_info
*info, char *stream,
        return res;
 }
 #endif /* LINUX_VERSION_CODE < KERNEL_VERSION(4,1,0) */
-#if LINUX_VERSION_CODE < KERNEL_VERSION(4,4,6)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,4,6) &&      \
+    LINUX_VERSION_CODE < KERNEL_VERSION(4,1,21)
 static inline void wireless_nlevent_flush(void) {}
 #endif
 #endif /* __BACKPORT_IW_HANDLER_H */


Emmanuel Grumbach
egrumbach@gmail.com
--
To unsubscribe from this list: send the line "unsubscribe backports" in

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: wireless_nlevent_flush backported to stable kernels
  2016-05-15  6:25 wireless_nlevent_flush backported to stable kernels Emmanuel Grumbach
@ 2016-05-15  9:50 ` Arend Van Spriel
  2016-05-16 19:26   ` Johannes Berg
  0 siblings, 1 reply; 5+ messages in thread
From: Arend Van Spriel @ 2016-05-15  9:50 UTC (permalink / raw)
  To: Emmanuel Grumbach, backports@vger.kernel.org

On 15-5-2016 8:25, Emmanuel Grumbach wrote:
> Hi,
> 
> Johanne's patch:
> 
> commit cb150b9d23be6ee7f3a0fff29784f1c5b5ac514d
> Author: Johannes Berg <johannes.berg@intel.com>
> Date:   Wed Jan 27 13:29:34 2016 +0100
> 
>     cfg80211/wext: fix message ordering
> 
> 
> has been backported to more stable kernels and hence backport needs to
> take that into account.
> I am using Ubuntu's wily kernel (4.2 based) and apparently, they
> backported Johanne's fix as well.
> 
> On my system, I fixed it with the patch below, but it is surely not good enough.

In general this is avoided by preceeding the stub function with:

#define wireless_nlevent_flush LINUX_BACKPORT(wireless_nlevent_flush)

This way you will use the stub and not the in-kernel function. There has
been discussions about adding a mechanism to avoid backport if kernel
has the function available. No actual work in that area has been done yet.

Regards,
Arend

> diff --git a/backport-include/net/iw_handler.h
> b/backport-include/net/iw_handler.h
> index e205d1e..b9c0144 100644
> --- a/backport-include/net/iw_handler.h
> +++ b/backport-include/net/iw_handler.h
> @@ -25,7 +25,8 @@ iwe_stream_add_point_check(struct iw_request_info
> *info, char *stream,
>         return res;
>  }
>  #endif /* LINUX_VERSION_CODE < KERNEL_VERSION(4,1,0) */
> -#if LINUX_VERSION_CODE < KERNEL_VERSION(4,4,6)
> +#if LINUX_VERSION_CODE < KERNEL_VERSION(4,4,6) &&      \
> +    LINUX_VERSION_CODE < KERNEL_VERSION(4,1,21)
>  static inline void wireless_nlevent_flush(void) {}
>  #endif
>  #endif /* __BACKPORT_IW_HANDLER_H */
> 
> 
> Emmanuel Grumbach
> egrumbach@gmail.com
> --
> To unsubscribe from this list: send the line "unsubscribe backports" in
> 
--
To unsubscribe from this list: send the line "unsubscribe backports" in

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: wireless_nlevent_flush backported to stable kernels
  2016-05-15  9:50 ` Arend Van Spriel
@ 2016-05-16 19:26   ` Johannes Berg
  2016-05-17  9:05     ` Arend Van Spriel
  0 siblings, 1 reply; 5+ messages in thread
From: Johannes Berg @ 2016-05-16 19:26 UTC (permalink / raw)
  To: Arend Van Spriel, Emmanuel Grumbach, backports@vger.kernel.org

On Sun, 2016-05-15 at 11:50 +0200, Arend Van Spriel wrote:
> 
> > On my system, I fixed it with the patch below, but it is surely not
> > good enough.
> In general this is avoided by preceeding the stub function with:
> 
> #define wireless_nlevent_flush LINUX_BACKPORT(wireless_nlevent_flush)
> 
> This way you will use the stub and not the in-kernel function.

That's normally fine, but not a good idea here because this really is a
*stub*, and thus using the stub instead of the real function removes
the ability to actually get the bugfix. So in this case, where it's a
stub and not a full backport, it's better to try to get the original
function in as many situations as possible.

> There has
> been discussions about adding a mechanism to avoid backport if kernel
> has the function available. No actual work in that area has been done
> yet.

Oh, I've done that - but it was so terribly slow that it was
essentially unusable...

johannes
--
To unsubscribe from this list: send the line "unsubscribe backports" in

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: wireless_nlevent_flush backported to stable kernels
  2016-05-16 19:26   ` Johannes Berg
@ 2016-05-17  9:05     ` Arend Van Spriel
  2016-05-17  9:08       ` Johannes Berg
  0 siblings, 1 reply; 5+ messages in thread
From: Arend Van Spriel @ 2016-05-17  9:05 UTC (permalink / raw)
  To: Johannes Berg, Emmanuel Grumbach, backports@vger.kernel.org



On 16-5-2016 21:26, Johannes Berg wrote:
> On Sun, 2016-05-15 at 11:50 +0200, Arend Van Spriel wrote:
>>  
>>> On my system, I fixed it with the patch below, but it is surely not
>>> good enough.
>> In general this is avoided by preceeding the stub function with:
>>
>> #define wireless_nlevent_flush LINUX_BACKPORT(wireless_nlevent_flush)
>>
>> This way you will use the stub and not the in-kernel function.
> 
> That's normally fine, but not a good idea here because this really is a
> *stub*, and thus using the stub instead of the real function removes
> the ability to actually get the bugfix. So in this case, where it's a
> stub and not a full backport, it's better to try to get the original
> function in as many situations as possible.
> 
>> There has
>> been discussions about adding a mechanism to avoid backport if kernel
>> has the function available. No actual work in that area has been done
>> yet.
> 
> Oh, I've done that - but it was so terribly slow that it was
> essentially unusable...

I remember and so the suggestion was to maintain a list of functions to
check. Or did you pursue that as well with same result?

Regards,
Arend
--
To unsubscribe from this list: send the line "unsubscribe backports" in

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: wireless_nlevent_flush backported to stable kernels
  2016-05-17  9:05     ` Arend Van Spriel
@ 2016-05-17  9:08       ` Johannes Berg
  0 siblings, 0 replies; 5+ messages in thread
From: Johannes Berg @ 2016-05-17  9:08 UTC (permalink / raw)
  To: Arend Van Spriel, Emmanuel Grumbach, backports@vger.kernel.org

On Tue, 2016-05-17 at 11:05 +0200, Arend Van Spriel wrote:
> 
> I remember and so the suggestion was to maintain a list of functions
> to check. Or did you pursue that as well with same result?

Well I had it set up that way, compiling a little test thing for each
function. Each one took quite a while, I don't remember the data
though.

johannes
--
To unsubscribe from this list: send the line "unsubscribe backports" in

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-05-17  9:09 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-15  6:25 wireless_nlevent_flush backported to stable kernels Emmanuel Grumbach
2016-05-15  9:50 ` Arend Van Spriel
2016-05-16 19:26   ` Johannes Berg
2016-05-17  9:05     ` Arend Van Spriel
2016-05-17  9:08       ` Johannes Berg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox